Add org and integration data to events from integration endpoints
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 624
Description
Not all events arising from integration endpoints are tagged with org or integration context data. (In this case, "endpoints" means both API endpoints and webhooks.) As much as possible, it would be great to remedy this. Specifically, we can add cals to `bind_org_context_from_integration(integration.id)` and `sentry_sdk.set_tag("integration_id", integration.id)` wherever they're missing.
Task:
- Investigate whether it's possible to do this tagging higher up the inheritance chain than it's currently being done, the higher the better, so we minimize the number of places we have to do it. (Note that both functions referenced above are idempotent, so if we accidentally call them twice in the request handler lifecycle, nothing will break.)
- In the places where the tagging can't be moved higher, add it to any endpoints where it's missing.
Here's a PR doing it for Jira webhooks: https://github.com/getsentry/sentry/pull/51648.
Here's one stab at pulling the tagging higher: https://github.com/getsentry/sentry/pull/51660.
Contributor guide
Assessment
This issue has not been assessed yet.