Skip to content

fix: pattern ingester pushes detected level as structured metadata#16924

Merged
trevorwhitney merged 2 commits intomainfrom
remove-indexed-level-from-agg-metrics
Mar 27, 2025
Merged

fix: pattern ingester pushes detected level as structured metadata#16924
trevorwhitney merged 2 commits intomainfrom
remove-indexed-level-from-agg-metrics

Conversation

@trevorwhitney
Copy link
Collaborator

What this PR does / why we need it:
Before this change, the pattern ingester pushed aggregated metrics as an indexed label. This is unnecessary as drilldown assumes all detected levels will be in structured metadata (which the indexed label will be stored as during level detection in the distributor). This is also problematic, as levels used for aggregated metrics will show up in the /label/level/values endpoint. For users who enforce policies around level, like all caps, then the values added by aggregated metric will be confusing. Finally, indexing the level also increases the cardinality of these streams unecessarily.

This PR changes the pattern ingester to send the detected level as structured metadata, which fixes all the problems listed above.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@trevorwhitney trevorwhitney requested a review from a team as a code owner March 26, 2025 21:08
@trevorwhitney trevorwhitney changed the title fix: pattern ingester pushes detect level as structured metadata fix: pattern ingester pushes detected level as structured metadata Mar 26, 2025
Copy link
Contributor

@JordanRushing JordanRushing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trevorwhitney trevorwhitney merged commit 66033bb into main Mar 27, 2025
61 checks passed
@trevorwhitney trevorwhitney deleted the remove-indexed-level-from-agg-metrics branch March 27, 2025 14:57
trevorwhitney added a commit that referenced this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants