Repository navigation
ref(metrics): Drop negatively sampled metrics immediately - #8425
Open
alexander-alderman-webb wants to merge 7 commits into
Open
alexander-alderman-webb wants to merge 7 commits into
alexander-alderman-webb wants to merge 7 commits into
Conversation
alexander-alderman-webb
marked this pull request as ready for review
November 30, 2026 09:23
Contributor
Coverage Results 📊✅ 59777 passed | ⏭️ 3119 skipped | Total: 62896 | Pass Rate: 95.04% | Execution Time: 162m 14s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 93.02% (40 of 43 changed executable lines covered; target 80%). Changed files with executable lines (4)
Coverage diff@@ Coverage Diff @@
## master #8425 +/-##
==========================================
Coverage 90.11% 90.11% —%
==========================================
Files 201 202 +1
Tracked lines 22199 22488 +289
Branches 7784 7880 +96
==========================================
+ Hits 20004 20264 +260
- Misses 2195 2224 +29
- Partials 1283 1302 +19Generated by Coverage Action |
alexander-alderman-webb
force-pushed
the
webb/early-exit-metrics-sampling
branch
from
November 30, 2026 09:57
8fd5e82 to
11f431e
Compare
alexander-alderman-webb
force-pushed
the
webb/early-exit-metrics-sampling
branch
from
November 30, 2026 10:02
11f431e to
dc72f2f
Compare
sentrivana
approved these changes
Nov 30, 2026
…exit-metrics-sampling
alexander-alderman-webb
force-pushed
the
webb/early-exit-metrics-sampling
branch
from
November 30, 2026 12:26
5813ee5 to
f7fe5a1
Compare
6 tasks
…exit-metrics-sampling
Contributor
PR risk: mediumFor commit Main concerns: data sent to Sentry, reach, host performance. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
…exit-metrics-sampling
6 tasks done
…ly-exit-metrics-sampling
This branch has not been deployed
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.
Drop metrics with a negative decision before applying attributes and calling
before_send_metric().The random number used for the decision is generated in
admit()instead of_add_to_window()and stored on the thread local reservoir.The
_activethread local also holds the window the metric was admitted to ifadmit()returnsTrue.To do this we have to make some concessions:
before_send_metric()cannot change the metric's namebefore_send_metric()takes longer than approx. 50 milliseconds to execute. This is a result of the flusher not performing any synchronization and relying on a 50 milliseconds grace period.This changes the semantics of the sample rate. The sample rate is now relative to metrics captured before invoking any hooks (previously metrics dropped in
before_send_metric()did not contribute).