You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(strawberry): Remove autodetection, always use sync extension (#4984)
### Description
#### Problem
There are two ways to instrument strawberry-graphl apps: via a sync or
an async extension. We enable one or the other based on what web
framework is installed (async framework -> async extension, sync
framework -> sync extension). This auto-detection can be overridden via
an integration option.
At some point (SDK 2.0?), we added `StrawberryIntegration` to
auto-enabling integrations, which means the brittle auto-detection kicks
in as soon as someone has `strawberry-graphl` installed. This can lead
to issues, most notably when we auto-enable the async version of the
extension even though the user's Strawberry app is actually sync.
#### Options
1. Removing the auto-detection, always enabling the sync version if not
specified otherwise.
This way we'll never mistakenly enable async code in a sync app. We also
had a
[report](#3670 (comment))
at some point that the sync extension actually performs better than
async, so enabling sync by default shouldn't be a big problem in async
apps.
2. Removing `StrawberryIntegration` from auto-enabling integrations.
Breaking change. People might just lose their traces and errors.
3. Improving the auto-detection.
Best option, but out of ideas how to do this.
Went with 1), all things considered it's the least breaking change
(unless there's a way to do 3). Needs a big callout in the changelog
anyway though.
#### Issues
Closes#4980
#### Reminders
- Please add tests to validate your changes, and lint your code using
`tox -e linters`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)
0 commit comments