storage: add timely step duration metric#34769
Open
antiguru wants to merge 3 commits intoMaterializeInc:mainfrom
Open
storage: add timely step duration metric#34769antiguru wants to merge 3 commits intoMaterializeInc:mainfrom
antiguru wants to merge 3 commits intoMaterializeInc:mainfrom
Conversation
Add `mz_timely_step_duration_seconds` histogram to the storage server, matching the existing metric in the compute server. This measures the time spent in each `step_or_park`/`step` call in the storage worker loop. The metric uses a `cluster => "storage"` label to distinguish it from the compute metric which uses `cluster => "compute"`. Introduces `StorageWorkerMetrics` to cache per-worker metrics, avoiding repeated `with_label_values` lookups on each loop iteration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a test to verify that both compute and storage report the `mz_timely_step_duration_seconds` metric with proper `cluster` and `worker_id` labels. Also: - Move the `Metrics` helper class from `test/cluster/mzcompose.py` to `misc/python/materialize/mzcompose/helpers/metrics.py` for reuse - Use a generic help string for the metric to avoid Prometheus registration conflicts between compute and storage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
antiguru
commented
Jan 20, 2026
…rage metrics Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Adds
mz_timely_step_duration_secondshistogram to the storage server, matching the existing metric in the compute server. Moves theMetricsclass from the cluster mzcompose test to the python module directory.🤖 Generated with Claude Code