Avoid duplicated sampling on Transaction events#1601
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1601 +/- ##
==========================================
- Coverage 98.47% 98.44% -0.03%
==========================================
Files 130 130
Lines 7223 7223
==========================================
- Hits 7113 7111 -2
- Misses 110 112 +2
Continue to review full report at Codecov.
|
Transport should only care about sending the event object to the right destination with right format. It doesn't need to check if it's allowed to send an event, which should already be done by `Client#capture_event`.
0154afb to
c623b0e
Compare
c623b0e to
915a105
Compare
sl0thentr0py
approved these changes
Oct 31, 2021
Member
sl0thentr0py
left a comment
There was a problem hiding this comment.
thx for the quick fix @st0012!
Looks good to my newbie eyes, just one minor optimization suggestion but can also ignore
Co-authored-by: Neel Shah <neelshah.sa@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As @sl0thentr0py pointed out on discord, having
sample_allowed?insidesending_allowed?causes double sampling on transaction events and should be avoided. So this PR fixes the issue and removes an unnecessary sending check from theTransportclass.