Skip to content

Conversation

@benclive
Copy link
Contributor

What this PR does / why we need it:
Aligns the old and new engines to use first-win semantics for duplicates when parsing log lines.

  • Switch to first-wins in new engine for logfmt & json
  • Add tests for first-wins to the json parser in the old engine (logfmt already had one)

Which issue(s) this PR fixes:
Fixes https://github.com/grafana/loki-private/issues/2038

Checklist

  • Tests updated

@benclive benclive requested a review from a team as a code owner October 22, 2025 17:01
@benclive benclive changed the title Use first-wins semantics for duplicate fields in logfmt/json parsers chore: Use first-wins semantics for duplicate fields in logfmt/json parsers Oct 22, 2025
Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

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

looks good, glad you caught this. thank you!

@benclive benclive merged commit dd52234 into main Oct 24, 2025
66 of 67 checks passed
@benclive benclive deleted the benclive/use-first-wins-semantics-for-logfmt-parsing branch October 24, 2025 09:07
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