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

fix: set default Scope._transaction_info value to None #3641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewsapw
Copy link

In #1490, the ._transaction_info property was added to the Scope class. However, there are some issues with this property:

  • It causes the error transaction_info: Discarded unknown attribute in older versions of the UI.
  • There is inconsistency in how the field is handled. Although it is marked as Mapping[str, str], in some places (for example, here), it is checked against None.

This PR sets the default value of Scope._transaction_info to None.

@andrewsapw andrewsapw force-pushed the fix-default-scope-transaction-info branch from f94c605 to 21344e4 Compare October 10, 2024 13:43
@szokeasaurusrex
Copy link
Member

@andrewsapw Could you please help me understand the problem you are experiencing?

It causes the error transaction_info: Discarded unknown attribute in older versions of the UI.

Regarding this error, could you please share a screenshot of the error message (or a link to the page, if you are using Sentry's SaaS offering)?

There is inconsistency in how the field is handled. Although it is marked as Mapping[str, str], in some places (for example, here), it is checked against None.

We can likely remove these checks against None, unless we can find somewhere where the field is set to None.

@andrewsapw
Copy link
Author

andrewsapw commented Oct 22, 2024

@szokeasaurusrex of course! Screenshot of the error:
image

@szokeasaurusrex
Copy link
Member

@andrewsapw Could you please also share a code snippet that reproduces this issue? And what version of Sentry self-hosted are you using?

@andrewsapw
Copy link
Author

@szokeasaurusrex , example of code that reproduces this issue:

sentry_sdk.capture_message("[INFO] Test .capture_message", level="info")

Version of Sentry: 22.6.0 e68da5c

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

Successfully merging this pull request may close these issues.

2 participants