ref(tracing): Move `TRANSACTION_SOURCE_*` constants to `Enum` by mgaligniana · Pull Request #3889 · getsentry/sentry-python · GitHub
Skip to content

ref(tracing): Move TRANSACTION_SOURCE_* constants to Enum - #3889

Merged
antonpirker merged 13 commits into
getsentry:masterfrom
mgaligniana:GH-2696-transaction-source-enum
Feb 24, 2025
Merged

antonpirker merged 13 commits into
getsentry:masterfrom
mgaligniana:GH-2696-transaction-source-enum

Conversation

@mgaligniana

Copy link
Copy Markdown
Contributor

Fixes GH-2696

@mgaligniana
mgaligniana marked this pull request as draft December 22, 2024 03:28
@codecov

codecov Bot commented Dec 22, 2024

Copy link
Copy Markdown

@mgaligniana
mgaligniana force-pushed the GH-2696-transaction-source-enum branch 2 times, most recently from f4bb234 to ef97faa Compare December 22, 2024 04:51
@mgaligniana

Copy link
Copy Markdown
Contributor Author

Linter is failing because of:

image

Should I fix them in a different commit?

@mgaligniana
mgaligniana marked this pull request as ready for review December 22, 2024 04:54

@antonpirker antonpirker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! thanks for the cleanup

@antonpirker

antonpirker commented Dec 23, 2024

Copy link
Copy Markdown
Contributor

Linter is failing because of:

image

Should I fix them in a different commit?

no, this is because of a new release of mypy. I will fix this.

@antonpirker
antonpirker enabled auto-merge (squash) December 23, 2024 09:02
@antonpirker

Copy link
Copy Markdown
Contributor

This breaks a lot of tests, because the full enum ends up in the envelope that is sent to Sentry and not the .value of the enum. Can you please fix this?

@antonpirker antonpirker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the tests, by making sure the .value of the enum (the string) ends up in the envelop json payload that is sent to Sentry.

auto-merge was automatically disabled December 23, 2024 13:37

Head branch was pushed to by a user without write access

@mgaligniana
mgaligniana force-pushed the GH-2696-transaction-source-enum branch 4 times, most recently from b016caf to 79f20d7 Compare December 23, 2024 13:51
@mgaligniana

Copy link
Copy Markdown
Contributor Author

Thank you @antonpirker! Now linter and tests passing! 💪

@mgaligniana
mgaligniana force-pushed the GH-2696-transaction-source-enum branch from 79f20d7 to e135bbc Compare January 14, 2025 13:26
@mgaligniana
mgaligniana force-pushed the GH-2696-transaction-source-enum branch from e135bbc to 6609d89 Compare January 15, 2025 12:01
@mgaligniana

Copy link
Copy Markdown
Contributor Author

Hi Anton! Just curious why did we have to delete the .value again. Let me know if there is something I can help

@antonpirker

Copy link
Copy Markdown
Contributor

I just made it so one does not have to always use the .value, so the enum is easier to use and error due to missing .value are not happening. otherwise it is a really cool change and I will merge it today

@antonpirker antonpirker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now ready to be merged!

@antonpirker
antonpirker merged commit 189e4a9 into getsentry:master Feb 24, 2025
@mgaligniana

Copy link
Copy Markdown
Contributor Author

Thank you @antonpirker !!

Comment thread sentry_sdk/tracing.py
Comment on lines +142 to +143

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see this! Thanks for the explanation!

scottbarnes added a commit to scottbarnes/openlibrary that referenced this pull request Aug 26, 2025
scottbarnes added a commit to scottbarnes/openlibrary that referenced this pull request Jan 17, 2026
bhardwajparth51 added a commit to bhardwajparth51/openlibrary that referenced this pull request Feb 17, 2026
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.

Transaction Source Enum

2 participants