Skip to content

fix(sdk-trace-base): derive SpanOptions from API type#6478

Merged
overbalance merged 4 commits intoopen-telemetry:mainfrom
embrace-io:overbalance/fix-sdk-trace-base-span-options
Mar 10, 2026
Merged

fix(sdk-trace-base): derive SpanOptions from API type#6478
overbalance merged 4 commits intoopen-telemetry:mainfrom
embrace-io:overbalance/fix-sdk-trace-base-span-options

Conversation

@overbalance
Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

SDK's SpanOptions duplicated fields from the API type, risking silent drift. Also used deprecated SpanAttributes.

Short description of the changes

  • Derive SDK SpanOptions from Omit<APISpanOptions, 'root'> instead of duplicating fields
  • Use Attributes instead of deprecated SpanAttributes in API's SpanOptions

Type of change

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

How Has This Been Tested?

  • Existing unit tests and type-checks pass

Checklist:

  • Followed the style guidelines of this project
  • Documentation has been updated

@overbalance overbalance requested review from a team as code owners March 6, 2026 00:23
@overbalance overbalance changed the title fix(sdk-trace-base): derive SpanOptions from API type to prevent drift fix(sdk-trace-base): derive SpanOptions from API type Mar 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.70%. Comparing base (124f09e) to head (e01544c).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6478   +/-   ##
=======================================
  Coverage   95.70%   95.70%           
=======================================
  Files         364      364           
  Lines       11779    11779           
  Branches     2751     2751           
=======================================
  Hits        11273    11273           
  Misses        506      506           
Files with missing lines Coverage Δ
packages/opentelemetry-sdk-trace-base/src/Span.ts 97.83% <ø> (ø)
🚀 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.

Copy link
Copy Markdown
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

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

I think this makes sense

@overbalance overbalance added this pull request to the merge queue Mar 10, 2026
Merged via the queue into open-telemetry:main with commit e7ced9f Mar 10, 2026
27 checks passed
@overbalance overbalance deleted the overbalance/fix-sdk-trace-base-span-options branch March 10, 2026 13:53
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.

2 participants