Skip to content

Avoid calling the before_send callback with transaction events - #1158

Merged
ste93cry merged 2 commits into
getsentry:masterfrom
ste93cry:fix/transaction-should-not-go-through-before-send-callback
Dec 27, 2020
Merged

ste93cry merged 2 commits into
getsentry:masterfrom
ste93cry:fix/transaction-should-not-go-through-before-send-callback

Conversation

@ste93cry

Copy link
Copy Markdown
Contributor

Reading the Tracing documentation I found out that the before_send callback shouldn't be called for the transactions. This PR fixes the behaviour, but it kinda of breaks the BC because users that were relying on this behaviour will not be able to do it anymore. Since this is a bug I consider the BC justified and I don't see any other way to avoid it anyway

@ste93cry ste93cry added this to the 3.1 milestone Dec 27, 2020
@ste93cry
ste93cry requested a review from stayallive December 27, 2020 00:07

@stayallive stayallive left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe you could point people to traces_sampler in case they were using before_send before?

But otherwise nice catch!

@ste93cry

Copy link
Copy Markdown
Contributor Author

Maybe you could point people to traces_sampler in case they were using before_send before?

Do you mean in the CHANGELOG?

@stayallive

Copy link
Copy Markdown
Collaborator

Yeah, no sense putting it in the UPGRADE, maybe something like:

- Fix unwanted call to the `before_send` callback with transaction events, use `traces_sampler` instead to filter transactions (#1158)

@ste93cry

Copy link
Copy Markdown
Contributor Author

Makes sense, done!

@ste93cry
ste93cry merged commit 490952f into getsentry:master Dec 27, 2020
@ste93cry
ste93cry deleted the fix/transaction-should-not-go-through-before-send-callback branch December 27, 2020 12:57
ste93cry added a commit to jarstelfox/sentry-php that referenced this pull request Dec 29, 2020
soundsgoodsofar pushed a commit to soundsgoodsofar/sentry-php that referenced this pull request Jan 8, 2021
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