Skip to content

fix(opentelemetry-core)!: defer tracestate vaidation#6459

Open
david-luna wants to merge 22 commits intoopen-telemetry:mainfrom
david-luna:790-tracestate
Open

fix(opentelemetry-core)!: defer tracestate vaidation#6459
david-luna wants to merge 22 commits intoopen-telemetry:mainfrom
david-luna:790-tracestate

Conversation

@david-luna
Copy link
Copy Markdown
Contributor

@david-luna david-luna commented Mar 2, 2026

Which problem is this PR solving?

Fixes #790

Short description of the changes

  • parsing logic has changed to avoid extra allocation and stop parsing after the max items is reached.
  • removed call to parse in the constructor. used in get/set/unset methods when needed
  • validate key and value in set() method before any parsing of mutation happens

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit tests

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 98.55072% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.75%. Comparing base (0086d6d) to head (6594b05).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ackages/opentelemetry-core/src/trace/TraceState.ts 98.55% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6459   +/-   ##
=======================================
  Coverage   95.75%   95.75%           
=======================================
  Files         373      373           
  Lines       12661    12694   +33     
  Branches     2991     3000    +9     
=======================================
+ Hits        12123    12155   +32     
- Misses        538      539    +1     
Files with missing lines Coverage Δ
api/src/trace/internal/tracestate-impl.ts 100.00% <ø> (ø)
api/src/trace/internal/utils.ts 100.00% <ø> (ø)
...ackages/opentelemetry-core/src/trace/TraceState.ts 98.75% <98.55%> (-1.25%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@david-luna david-luna changed the title fix(opentelemetry-core): validate "ot" entry and defer tracestate vaidation fix(opentelemetry-core): defer tracestate vaidation Mar 20, 2026
@david-luna david-luna marked this pull request as ready for review March 26, 2026 09:19
@david-luna david-luna requested review from a team as code owners March 26, 2026 09:19
@david-luna david-luna changed the title fix(opentelemetry-core): defer tracestate vaidation fix(opentelemetry-core)!: defer tracestate vaidation Apr 7, 2026
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.

Do not validate tracestate

1 participant