Repository navigation
Conversation
Problem
When persist_shard_metrics leaves out the per-shard families (the
summary and none modes), we lose the per-shard drill-down
that we might need.
E.g., mz_persist_shard_update_count{name=$source}.
The aggregates show how bad things are and the heaviest hitter but not
all the metrics for one shard. However, turning per-shard series back on
for the whole environment would bring the cardinality problem right back.
Solution
Add persist_per_shard_metrics_enable_regex, if the regex isn't empty
it keeps the series whose shard or name label matches, and drops the rest.
Testing
New tests check that matching a shard id brings back exactly that
shard's series in all 28 families, identical to the ones in the both
mode, and that matching by name and by an alternation keeps exactly
the matched shards. They also check that an empty regex keeps none, and
that an unanchored pattern over-matches as documented: it keeps every
name it is a substring of, and a fragment of one shard's id also keeps
shards whose name contains it
Closes: PER-103
Contributor
Author
|
Last in the stack: #39354 |
Alphadelta14
approved these changes
Oct 7, 2026
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.
Problem
When persist_shard_metrics leaves out the per-shard families (the summary and none modes), we lose the per-shard drill-down that we might need.
E.g., mz_persist_shard_update_count{name=$source}.
The aggregates show how bad things are and the heaviest hitter but not all the metrics for one shard. However, turning per-shard series back on for the whole environment would bring the cardinality problem right back.
Solution
Add persist_per_shard_metrics_enable_regex, if the regex isn't empty it keeps the series whose shard or name label matches, and drops the rest.
Testing
New tests check that matching a shard id brings back exactly that shard's series in all 28 families, identical to the ones in the both mode, and that matching by name and by an alternation keeps exactly the matched shards. They also check that an empty regex keeps none, and that an unanchored pattern over-matches as documented: it keeps every name it is a substring of, and a fragment of one shard's id also keeps shards whose name contains it
Closes: PER-103