Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sdk-trace-base): ensure attribute value length limit is enforced on span creation #4417

Merged

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

The attribute value length limit was not enforced when a span was created with attributes

Fixes #4416

Short description of the changes

Set the length limit before setting the attributes.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added unit test

@pichlermarc pichlermarc added pkg:sdk-trace-base bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect labels Jan 15, 2024
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Merging #4417 (9c3dbd7) into main (5700853) will increase coverage by 92.24%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           main    #4417       +/-   ##
=========================================
+ Coverage      0   92.24%   +92.24%     
=========================================
  Files         0      333      +333     
  Lines         0     9451     +9451     
  Branches      0     2008     +2008     
=========================================
+ Hits          0     8718     +8718     
- Misses        0      733      +733     
Files Coverage Δ
packages/opentelemetry-sdk-trace-base/src/Span.ts 97.50% <100.00%> (ø)

... and 332 files with indirect coverage changes

@pichlermarc pichlermarc merged commit 6898a34 into open-telemetry:main Jan 15, 2024
20 checks passed
@pichlermarc pichlermarc deleted the fix/value-length-limit branch January 15, 2024 14:53
Zirak pushed a commit to Zirak/opentelemetry-js that referenced this pull request Sep 14, 2024
…on span creation (open-telemetry#4417)

* fix(sdk-trace-base): ensure attribute value length limit is enforced on span creation

* fix(changelog): add changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:sdk-trace-base priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Span attributes value length limit ignored for attributes passed to the Span constructor
2 participants