[OTLP EXPORTER] Support setting byte arrays in all attribute collections and reject null keys#4226
Merged
marcalff merged 18 commits intoJul 19, 2026
Conversation
…p populate attribute utils
3 tasks
dbarker
commented
Jul 8, 2026
dbarker
marked this pull request as ready for review
July 8, 2026 22:48
dbarker
commented
Jul 8, 2026
|
|
||
| // Test that updating a duplicate key does not consume an attribute slot or increment | ||
| // the dropped-attributes counter, even when the attribute limit is already reached. | ||
| TEST(OtlpRecordable, DISABLED_SetAttributeDeduplicateDoesNotIncrementDropped) |
Member
Author
There was a problem hiding this comment.
These tests for duplicate attribute keys are added but disabled since OtlpRecordable will duplicate keys now.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4226 +/- ##
==========================================
+ Coverage 81.16% 81.19% +0.03%
==========================================
Files 444 444
Lines 18800 18880 +80
==========================================
+ Hits 15258 15328 +70
- Misses 3542 3552 +10
🚀 New features to boost your workflow:
|
owent
reviewed
Jul 10, 2026
owent
reviewed
Jul 10, 2026
…ds. Use static_cast when setting int types into proto values
…te array truncation
Member
Author
|
Hi @owent Thanks for initial feedback. Can you take another review pass? |
owent
reviewed
Jul 16, 2026
owent
approved these changes
Jul 16, 2026
owent
left a comment
Member
There was a problem hiding this comment.
There's still an unnecessary conversion, but it's harmless. The rest LGTM. Thanks.
marcalff
reviewed
Jul 16, 2026
Member
|
do-not-merge label: to merge after the release of opentelemetry-cpp 1.28.0 |
…method to handle exceptions from nost::visit. remove unnecessary static casts in the attribute value visitors
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.
Fixes # (issue)
Fixes a few non-compliant areas of the otlp attribute spec:
See:
https://opentelemetry.io/docs/specs/otel/common/#attribute
https://opentelemetry.io/docs/specs/otel/common/#attribute-collections
All attribute collections then must accept a byte array.
Resources, Instrumentation Scopes, Metric points, Spans, Span Events, Span Links and Log Records, contain a collection of attributes.
Changes
allow_bytesFor significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes