sentry-python
sentry-python copied to clipboard
Exception attributed to previous transaction
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.21.1
Steps to Reproduce
- Create a virtual env, activate it, and install
sentry_sdk
. - Create a minimal
app.py
with this:
import sentry_sdk
from sentry_sdk import start_transaction
sentry_sdk.init(
dsn="<add_me>",
debug=True,
traces_sample_rate=1.0,
)
with start_transaction(name="my_transaction"):
pass
raise ValueError('Oh no!')
- Run
app.py
. - Find the event in Sentry.
Expected Result
The Sentry error event has no transaction tag since my_transaction
has already concluded by the time the exception occurred.
Actual Result
The Sentry error event has a transaction
tag with my_transaction
attached.