Skip to content

Conversation

@lobsterkatie
Copy link
Member

For reasons of backwards compatibility, we still support changing the active transaction's name by assigning to scope.transaction, even though scope.transaction is actually the Transaction object whose name you're changing. Eventually we won't support it, though, and in the meantime it's very confusing. This PR therefore updates the code to do it the right way, which is to first retrieve the transaction and then set its name directly.

Fixes getsentry/sentry-python#1155.

@vercel
Copy link

vercel bot commented Mar 9, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sentry/sentry-docs/CeWSeygWiCGX4HVu4ikGUwu2dDjA
✅ Preview: https://sentry-docs-git-kmclb-fix-python-set-transaction-name.sentry.dev

@sl0thentr0py sl0thentr0py merged commit df85c0b into master Mar 10, 2022
@sl0thentr0py sl0thentr0py deleted the kmclb-fix-python-set-transaction-name branch March 10, 2022 10:20
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting transaction name doesn't work from child span.

3 participants