fix: skip per-label limiter and sanitizer for info metrics#6660
Merged
electron0zero merged 4 commits intografana:mainfrom Mar 12, 2026
Merged
fix: skip per-label limiter and sanitizer for info metrics#6660electron0zero merged 4 commits intografana:mainfrom
electron0zero merged 4 commits intografana:mainfrom
Conversation
…fo metrics The PerLabelLimiter was tracking cardinality for ALL labels that passed through it, including resource attributes from target_info and host_info. This caused the demand estimate metric to report way more label names instead of just the configured dimensions from span-metrics and service-graphs. info metrics carry all resource attributes as labels and have high cardinality by design so we should not limit and sanitize info metrics. Made chanegs to skip the span name drain sanitizer for these metrics as well.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
oleg-kozlyuk-grafana
approved these changes
Mar 12, 2026
Add TestManagedRegistry_InfoMetricLabelsNotInDemandEstimate that pushes data through both NewLabelBuilder (span-metrics) and NewInfoMetricLabelBuilder (target_info, host_info), then asserts only span-metrics labels appear in the tempo_metrics_generator_registry_label_cardinality_demand_estimate metric.
Member
Author
|
@codex review again |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
What this PR does:
The PerLabelLimiter was tracking cardinality for ALL labels that passed through it, including resource attributes from target_info and host_info.
This caused the demand estimate metric to report way more label names instead of just the configured dimensions from span-metrics and service-graphs.
info metrics carry all resource attributes as labels and have high cardinality by design so we should not limit and sanitize info metrics.
Made changes to skip the span name drain sanitizer for info metrics as well.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]