Add metrics to track server startup time spending on different status callback#18493
Open
J-HowHuang wants to merge 2 commits into
Open
Add metrics to track server startup time spending on different status callback#18493J-HowHuang wants to merge 2 commits into
J-HowHuang wants to merge 2 commits into
Conversation
Wraps each ServiceStatusCallback registered during server startup with a TimeToHealthyTrackingCallback that records the elapsed time until the delegate first reports GOOD into a per-checker ServerGauge: - STARTUP_CURRENT_STATE_MATCH_TIME_MS - STARTUP_EXTERNAL_VIEW_MATCH_TIME_MS - STARTUP_REALTIME_CONSUMPTION_CATCHUP_TIME_MS Also updates MultipleCallbackServiceStatusCallback to iterate through all callbacks instead of short-circuiting on the first non-GOOD one, so the time-to-healthy wrapper observes every callback transition. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The original contract returned the first non-GOOD status from MultipleCallbackServiceStatusCallback and short-circuited the loop. Short-circuiting prevented the time-to-healthy wrappers added in the previous commit from observing later callbacks transitioning to GOOD. Iterate every callback so wrappers see each transition, but still report the first non-GOOD status, so the aggregate behavior is unchanged for broker/controller/minion/server health endpoints. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18493 +/- ##
============================================
+ Coverage 63.68% 63.74% +0.05%
Complexity 1685 1685
============================================
Files 3265 3266 +1
Lines 199745 199837 +92
Branches 31013 31024 +11
============================================
+ Hits 127215 127392 +177
+ Misses 62395 62285 -110
- Partials 10135 10160 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Changes
Wraps each ServiceStatusCallback registered during server startup with a TimeToHealthyTrackingCallback that records the elapsed time until the delegate first reports GOOD into a per-checker ServerGauge:
STARTUP_CURRENT_STATE_MATCH_TIME_MSSTARTUP_EXTERNAL_VIEW_MATCH_TIME_MSSTARTUP_REALTIME_CONSUMPTION_CATCHUP_TIME_MSAlso updates
MultipleCallbackServiceStatusCallbackto iterate through all callbacks instead of short-circuiting on the first non-GOOD one, so the time-to-healthy wrapper observes every callback transition.