-
Notifications
You must be signed in to change notification settings - Fork 515
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
Added top level api to get current span and transaction #1954
Added top level api to get current span and transaction #1954
Conversation
sentry_sdk/api.py
Outdated
@@ -53,6 +53,9 @@ def overload(x): | |||
"set_user", | |||
"set_level", | |||
"set_measurement", | |||
"get_current_span", | |||
"get_current_transaction", | |||
"get_current_span_or_transaction", |
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.
you also have to add these to __init__.py
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.
done.
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.
as discussed in slack, we just need get_current_span
, everything else about the transaction is internal details
Idea originated in this comment of a code review: #1089 (comment)