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
{{ message }}
Repository navigation
Clarify that continue_trace does not start transaction #9771
The documentation should clarify the fact that while continue_trace creates transactions, it does not start them. For instance, if one has the following code:
withsentry_sdk.continue_trace(sampled=True, ...):
... # do something ...
The generated transaction does not get sent to Sentry (despite the sampled=True) because the transaction was not started with start_transaction.
Suggested Solution
The above sample can be corrected as follows:
transaction=sentry_sdk.continue_trace(sampled=True, ...)
withsentry_sdk.start_transaction(transaction):
... # do something ...
This way, the transaction is continued from the trace, and it gets started properly.
We should include an example like the above somewhere in the docs, and also explain that transactions must always be started with start_transaction. A good place to do this might be here.
Making these changes will help avoid the confusion that led to getsentry/sentry-python#2990 being opened, even though the behavior described in that issue is expected.
Activity