Skip to content
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

Transaction.set_data() does not work #930

Open
remilapeyre opened this issue Nov 24, 2020 · 0 comments
Open

Transaction.set_data() does not work #930

remilapeyre opened this issue Nov 24, 2020 · 0 comments

Comments

@remilapeyre
Copy link

@remilapeyre remilapeyre commented Nov 24, 2020

The following code

import sentry_sdk
from sentry_sdk import start_transaction

sentry_sdk.init(traces_sample_rate=1.0, dsn=...)
with start_transaction(op="GetDatasets", name='DUMMY') as span:
    span.set_data('foo', 'bar')
    print('foo')

will silently discard the data set in the transaction as it is only currently supported by child spans, not the transaction despite the transaction inheriting from span. One solution to fix this would be to make Transaction.set_data() raise an exception as it should not be used, but I think the best path forward would be to add actual support to extra data in Transaction.

I think this will require changes in the API thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant