Skip to content

[Depends on #7948] Feat/bytes limit#7990

Open
NesterovYehor wants to merge 11 commits intoopen-telemetry:mainfrom
NesterovYehor:feat/bytes-limit
Open

[Depends on #7948] Feat/bytes limit#7990
NesterovYehor wants to merge 11 commits intoopen-telemetry:mainfrom
NesterovYehor:feat/bytes-limit

Conversation

@NesterovYehor
Copy link
Contributor

@NesterovYehor NesterovYehor commented Mar 3, 2026

Fixes #7954

This draft PR applies the SDK attribute value limit to the new BYTES attribute type.

The limiter has been implemented for trace and log attributes, ensuring values are truncated according to the configured attribute size limit (counting each byte as 1).

However, I was not able to identify the correct integration point for applying the same limit in metrics and resource attributes within this repository. I would appreciate guidance on where the limiter should be applied for those paths to ensure consistent behavior across signals.

@NesterovYehor NesterovYehor marked this pull request as draft March 3, 2026 11:55
Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

The approach looks good 👍 I think we can try shipping support for bytes in the upcoming release.

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 89.79592% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.6%. Comparing base (8b05173) to head (131c665).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
log/keyvalue.go 0.0% 3 Missing ⚠️
attribute/internal/attribute.go 83.3% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7990   +/-   ##
=====================================
  Coverage   81.6%   81.6%           
=====================================
  Files        304     304           
  Lines      23424   23473   +49     
=====================================
+ Hits       19127   19177   +50     
+ Misses      3909    3908    -1     
  Partials     388     388           
Files with missing lines Coverage Δ
attribute/hash.go 90.1% <100.0%> (+1.0%) ⬆️
attribute/key.go 100.0% <100.0%> (ø)
attribute/kv.go 100.0% <100.0%> (ø)
attribute/type_string.go 60.0% <ø> (ø)
attribute/value.go 93.3% <100.0%> (+0.7%) ⬆️
sdk/log/record.go 100.0% <100.0%> (ø)
sdk/trace/span.go 85.6% <100.0%> (+0.1%) ⬆️
attribute/internal/attribute.go 83.3% <83.3%> (ø)
log/keyvalue.go 95.6% <0.0%> (-1.5%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NesterovYehor NesterovYehor marked this pull request as ready for review March 7, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sdk: Apply attribute value limit for BYTES

2 participants