Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strawberry.extensions.tracing.sentry will be impossible to import with sentry-sdk>=3.0.0 #3590

Closed
szokeasaurusrex opened this issue Aug 7, 2024 · 0 comments · Fixed by #3672

Comments

@szokeasaurusrex
Copy link
Contributor

szokeasaurusrex commented Aug 7, 2024

Hi, I am one of the maintainers of the Sentry Python SDK.

I am writing in to let you know about a change in our next major release (likely 3.0.0), which will break strawberry.extensions.tracing.sentry by making it impossible to import this module when sentry-sdk>=3.0.0 is installed. Specifically, we will remove sentry_sdk.configure_scope, which you are importing in the strawberry.extensions.tracing.sentry module.

Since the Sentry tracing module built into Strawberry is already deprecated (sentry-sdk natively supports Strawberry now), I would recommend removing the strawberry.extensions.tracing.sentry module completely. Otherwise, it would be a good idea to handle the ImportError or to migrate to the new API replacing configure_scope.

We still have no timeline on when we are releasing Sentry SDK 3.0.0, but it will likely only be released several weeks or months from now – so, you still have time before this breaks. Just wanted to give a heads up.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
sentrivana pushed a commit to getsentry/sentry-python that referenced this issue Oct 22, 2024
As suggested by @szokeasaurusrex in strawberry-graphql/strawberry#3590, Strawberry is preparing to fully remove its deprecated SentryTracingExtension in favor of the integration provided by the Sentry SDK.

This PR prepares the Sentry Strawberry integration for that removal by:
- fixing that the integration would assume Strawberry is not installed if the extension cannot be imported
- making sure tests with Strawberry versions before and after the removal still work

I also checked that removing the extension does not otherwise affect the integration: The extension's sync and async variants are imported to replace them and to guess whether sync or async code is used. Both still works if the imports are defaulted to None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant