Repository navigation
fix(core): Time out performance collection on a monotonic clock - #6739
Open
runningcode wants to merge 2 commits into
Open
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
The 30s collection timeout compared wall-clock readings, so a backward clock step kept collection running past the timeout and a forward step stopped it early. Measure it with a Deadline on the options' monotonic ticker instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR risk: mediumFor commit Main concerns: reach, data sent to Sentry, host performance. This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
runningcode
marked this pull request as ready for review
November 23, 2026 10:36
runningcode
requested review from
markushi and
romtsn
and removed request for
a team
November 23, 2026 10:36
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.
📜 Description
The 30s performance collection timeout in
DefaultCompositePerformanceCollectornow uses aDeadlineonoptions.getMonotonicTicker()instead of comparing wall-clock readings.At exactly 30s the collection now times out (
Deadline.hasPassed()is inclusive), where it previously needed one tick more.💡 Motivation and Context
A backward wall-clock step kept collection running past the timeout, and a forward step stopped it early. Found while reviewing #6591, which fixes the sample timestamps but leaves the timeout alone. This only changes how a duration is measured, not any timestamp the SDK sends.
#6589 edits the same
run()block; whichever lands second needs a trivial rebase.💚 How did you test it?
New unit tests step the wall clock forward and backward with
TestMonotonicTicker; they fail onmain.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code