Repository navigation
fix(otel): log baggage members under a baggage group - #60
Open
josuegiron wants to merge 1 commit into
Open
josuegiron wants to merge 1 commit into
josuegiron wants to merge 1 commit into
Conversation
Baggage members were added as top-level record attributes, so a member key could duplicate a record key such as msg or level. Log them under the new BaggageKey group instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
When baggage logging is enabled, members are now logged under one
baggagegroup ("baggage":{"request_id":"r1"}in JSON,baggage.request_idon span events) instead of as top-level attributes, so a member key cannot duplicate a record key such asmsg,level,time,source,trace_idorspan_id. Adds the exported constantBaggageKey. No group is added when the filters drop every member. README and doc comment updated.Output change: baggage keys move under
baggage; ships in a minor otel release.Verification
gofmt -l .,go vet ./...,go test -race ./...,govulncheck ./...inotel/. NewBenchmarkHandleBaggage: before ~1.2-1.6 us/op, 128 B, 1 alloc; after ~1.4 us/op, 208 B, 2 allocs.🤖 Generated with Claude Code