-
Notifications
You must be signed in to change notification settings - Fork 472
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
Improve debug message when dropping transaction #3000
Comments
szokeasaurusrex
added a commit
that referenced
this issue
Apr 22, 2024
Transactions that are discarded because `_span_recorder` is `None` can also be discarded because they were not started with `sentry_sdk.start_transaction`. This change updates the debug message accordingly. Fixes GH-3000
szokeasaurusrex
added a commit
that referenced
this issue
Apr 22, 2024
Transactions that are discarded because `_span_recorder` is `None` can also be discarded because they were not started with `sentry_sdk.start_transaction`. This change updates the debug message accordingly. Fixes GH-3000
szokeasaurusrex
added a commit
that referenced
this issue
Apr 25, 2024
Transactions that are discarded because `_span_recorder` is `None` can also be discarded because they were not started with `sentry_sdk.start_transaction`. This change updates the debug message accordingly. Fixes GH-3000
szokeasaurusrex
added a commit
that referenced
this issue
Apr 25, 2024
Transactions that are discarded because `_span_recorder` is `None` can also be discarded because they were not started with `sentry_sdk.start_transaction`. This change updates the debug message accordingly. Fixes GH-3000
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We log the following debug message when we drop a transaction that has no span recorder:
While having
sampled=False
is one potential cause for lacking a span recorder, transactions that havesampled=True
can also output this debug message if they are not started withstart_transaction
. This behavior is confusing, and led to issue #2990 being opened, even though the behavior described in that issue is expected, since we require all transactions to be started withstart_transaction
in order to be sent to Sentry.Therefore, before logging this message, we should check whether
sampled
isFalse
. If it is, we can log the current message, otherwise we should log:The update needs to be made here.
We could also consider logging a warning when a user calls
__enter__
on a transaction that has not been started viastart_transaction
– the user likely intends to start the transaction in these cases.The text was updated successfully, but these errors were encountered: