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

respect IsSampled in SqlListener #1933

Merged
merged 7 commits into from
Sep 22, 2022

Conversation

SimonCropp
Copy link
Contributor

No description provided.

…qlListener.cs

Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@SimonCropp
Copy link
Contributor Author

@lucas-zimerman yep. good point

@mattjohnsonpint
Copy link
Contributor

Not sure I understand the reason for this PR. Please add a better description to the top of this PR, or reference an issue if there is one open. Thanks.

@SimonCropp
Copy link
Contributor Author

when looking into fixing #1350. i noticed that SentryEFCoreListener does a IsSampled check that that point. there are even explicit tests for that check. given SentrySqlListener should follow the same pattern, i assumed it was missing.

did i assume wrong?

@mattjohnsonpint
Copy link
Contributor

After looking into this further, I see that the sampling decision is originally made in StartTransaction, and then later it's used to filter which get sent to Sentry. So anything in between is an optimization, in that there's no purpose in capturing a span if it's part of a transaction that is going to be discarded. So this doesn't fix anything in particular, but it is still good to have.

Copy link
Contributor

@mattjohnsonpint mattjohnsonpint left a comment

Choose a reason for hiding this comment

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

Two minor code improvement suggestions, but looks good otherwise.

@mattjohnsonpint mattjohnsonpint merged commit 57044ff into main Sep 22, 2022
@mattjohnsonpint mattjohnsonpint deleted the respect-IsSampled-in-SqlListener branch September 22, 2022 14:11
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.

3 participants