[DO NOT MERGE] Prototype JSON representation for attribute collections - #8768
Draft
pellared wants to merge 4 commits into
Draft
[DO NOT MERGE] Prototype JSON representation for attribute collections#8768pellared wants to merge 4 commits into
pellared wants to merge 4 commits into
Conversation
pellared
marked this pull request as ready for review
September 2, 2026 11:50
pellared
marked this pull request as draft
September 2, 2026 11:50
Pull request dashboard statusWaiting on the author · refreshed 2026-09-02 21:38 UTC Move out of draft to request review. Status above doesn't look right?
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8768 +/- ##
============================================
+ Coverage 91.29% 91.30% +0.01%
- Complexity 10498 10502 +4
============================================
Files 1006 1006
Lines 28338 28351 +13
Branches 3581 3583 +2
============================================
+ Hits 25870 25885 +15
+ Misses 1675 1672 -3
- Partials 793 794 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Prototypes open-telemetry/opentelemetry-specification#5149 in Java.
This complements the existing Go prototypes:
What this prototypes
Attributesimplementation'stoString()to encode the collection as a compact JSON object.Value.asString(), including its handling of nested arrays/maps, bytes, empty values, non-finite doubles, and JSON escaping.LoggingSpanExporterandSystemOutLogRecordExporter.For example, diagnostic output changes from:
to:
{"animal":"cat","bytes":"AQID","empty":null}Scope and merge status
This is intentionally a draft and marked DO NOT MERGE while the specification change is pending.
No public API or dependency is added. The repository documents
toString()output as unstable. The logging/stdout exporter formats also remain diagnostic and unspecified; their updated tests demonstrate that the proposed common representation works in real exporters, not that the surrounding exporter format is now guaranteed.This PR prototypes the Attribute Collection representation section. Java does not expose a standalone
Attributepair type, so this does not add public API solely to prototype the single-attribute section.AI assistance
This prototype was prepared with (a huge) assistance from OpenAI Codex. 😉