Skip to content

fix: short circuit level detection when already detected #17028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

trevorwhitney
Copy link
Collaborator

What this PR does / why we need it:

#16924 changed how the pattern ingester sends the detected level back into the distributors for aggregated metrics. However, the distributors weren't actually checking if detected_level was already set in structured metadata, and therefore was still trying to do it's own level detection. This worked against my test data locally, as the original services had indexed level fields that showed up in the aggregated metric log line, but this very much didn't work in many other places :(

For example, I broke our ops environment real good. See all the unknown levels, and when I started running the custom image on distrubtors to test my change.

Screenshot 2025-04-03 at 15 38 45

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 April 3, 2025 21:40
@trevorwhitney trevorwhitney added type/bug Somehing is not working as expected backport k248 labels Apr 3, 2025
@loki-gh-app
Copy link
Contributor

loki-gh-app bot commented Apr 3, 2025

This PR must be merged before a backport PR will be created.

1 similar comment
@loki-gh-app
Copy link
Contributor

loki-gh-app bot commented Apr 3, 2025

This PR must be merged before a backport PR will be created.

@trevorwhitney trevorwhitney merged commit 58aa00a into main Apr 3, 2025
64 checks passed
@trevorwhitney trevorwhitney deleted the short-circuit-level-detection branch April 3, 2025 21:46
loki-gh-app bot pushed 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
backport k248 size/M type/bug Somehing is not working as expected
2 participants