-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix(profiles): Rate limit profiles when transaction was sampled #4195
Merged
+101
−0
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e7d40a3
test
jjbayer ff52ec6
fix
jjbayer e7efe1a
fix
jjbayer 31b7b8a
changelog
jjbayer 35b4b61
integration test
jjbayer 2f81db3
timeouts
jjbayer e40197b
Merge remote-tracking branch 'origin/master' into fix/profiles-rate-l…
jjbayer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to check for
TransactionIndexed
here, because indexed transactions will trigger theif let Some(category) = summary.event_category {
branch above.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're correct that we don't have to check indexed here, but for the wrong reason.
It won't trigger the branch, because here we never have an
event_category
. But we don't have to check the indexed payload because I assume we don't want to enforce the indexed profile quota on profiles.But this really is awkward and tricky, because ideally we should persist the information that we dropped indexed transactions on the profile (so it is treated like dynamic sampling), because then the profiling consumers later know that there won't be any transactions for the profiles (like it would be the case if the transaction is dynamically sampled).
As a side note, god damn I hate this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's break it down:
transaction
ortransaction_indexed
, the profile is already dropped here.transaction
, the new code drops the profile.transaction_indexed
, we are in undefined territory. I want to err on the side of not enforcingtransaction_indexed
on profiles, but it is awkward like you said, because in the "keep" case we would drop the profile.Yes.