-
Notifications
You must be signed in to change notification settings - Fork 27
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
[BUG] Sentry scope migration fo 2.x #129
Conversation
migrate scope usage to v2.x more info https://docs.sentry.io/platforms/python/migration/1.x-to-2.x#scope-configuring
Thanks! No idea what's happened to my pipelines.. I'll try to find time this week. |
it seems to be some sort of version incompatibility between potery, celery and uvicorn, it needs a general version bump |
Hmm, you might be right! PR welcome! If no one submits one, I'll try to have a look this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forcing users onto a new sentry-sdk version seems a bit aggressive. Could we instead add something like this?
import pkg_resources
installed_version = pkg_resources.get_distribution("sentry_sdk").version
...
if installed_version < "0.14.3":
with sentry_sdk.configure_scope() as scope:
scope.set_tag('transaction_id', guid)
else:
scope = sentry_sdk.get_isolation_scope()
scope.set_tag('transaction_id', guid)
And substitute 0.14.3 for whatever the version before the new API was added is?
If this package is 3.8+ (is it?) we should be able to use from importlib.metadata import version
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good!
Sorry for the delay, @pedroserrudo. This looks perfect, thanks. I'll look into pipelines on Friday after work, and get this out in the weekend. 😊 |
Hmmm, pipelines still seem to fail due to dependencies. 🤔 |
Hi, could you look into the failing tests? 😊 They're passing in main now. |
Thanks so much 😊 I'll release tomorrow. |
migrate sentry scope usage to v2.x
more info