feat(integrations): Add on-demand source context fetching from SCM integrations#110324
Conversation
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Backend Test FailuresFailures on
|
Backend Test FailuresFailures on
|
oioki
left a comment
There was a problem hiding this comment.
Approved under assumption that the feature will be enabled for specific customers who asked for it (feature flag or org/project setting that is disabled by default).
armenzg
left a comment
There was a problem hiding this comment.
As a concept, this makes sense 🎉
We will need the org setting or project setting to enable fetching source context.
28bc5b5 to
76b4840
Compare
b1d7605 to
35b79fb
Compare
…tegrations Add feature flag, backend utility, and API endpoint for fetching source context lines from SCM integrations when frames lack embedded context.
35b79fb to
d11a4e2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
…tegrations (#110324) When stack trace frames lack inline source context, this feature fetches the file from the configured SCM integration (GitHub, GitLab, Perforce) and returns the surrounding lines via a new API endpoint. - New endpoint: /projects/{org}/{project}/stacktrace-source-context/ - New utility: fetch_source_context_from_scm() with caching - Feature-flagged behind organizations:scm-source-context --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>

When stack trace frames lack inline source context, this feature fetches the file from the configured SCM integration (GitHub, GitLab, Perforce) and returns the surrounding lines via a new API endpoint.