Stream provisioning metric changes#1014
Open
dhananjay-sawner wants to merge 7 commits into
Open
Conversation
added 7 commits
May 9, 2026 14:39
Captures the duration between datastream creation (system.creation.ms) and the INITIALIZING -> READY transition in handleDatastreamAddOrDelete. Aggregate-only sliding-window histogram (15 min) on the Coordinator module, registered via BrooklinHistogramInfo in CoordinatorMetrics so the metrics bridge surfaces it (per #945 precedent). Resume from STOPPED bypasses this code path (DatastreamResources.resume sets READY directly), so the metric only fires on initial creation.
Adds an INFO log line in recordTimeToReadyMs alongside the histogram update so per-stream provisioning times are recoverable from logs. The histogram aggregates across the sliding window and cannot expose individual sample values; the log line preserves per-datastream attribution for retrospective analysis.
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.
Summary
timeToReadyMshistogram (Coordinator): records the duration between datastream creation (system.creation.ms) and theINITIALIZING -> READYtransition. Uses a 15-minute sliding windowreservoir; exposed via the standard
BrooklinHistogramInfoattributes (Count, Max, Mean, p50/p75/p95/p99, etc.). Enables alerting on long provisioning viaMax.slowProvisioningCountcounter (Coordinator): incremented whenever a datastream's time-to-ready exceeds a configurable threshold.brooklin.server.coordinator.slowProvisioningThresholdMs: controls the threshold above which a provisioning is counted as slow. Default 10 minutes. Threshold lives in config, so brooklin-server can tune per fabric without a library bump.Testing Done
testTimeToReadyHistogramOnCreate— histogram count increases and sample is non-negative afterINITIALIZING -> READYtestTimeToReadyHistogramNotEmittedOnResume— histogram count does not change onSTOPPED -> READYresumetestSlowProvisioningCounterIncrementsWhenAboveThreshold— with threshold = 0 ms, counter increments after stream goes READYtestSlowProvisioningCounterDoesNotIncrementWhenBelowThreshold— with threshold = 1 h, counter stays unchanged after stream goes READYmint build