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

feat(sdk-trace-base)!: Add parentSpanContext and remove parentSpanId #5450

Conversation

JacksonWeber
Copy link
Contributor

@JacksonWeber JacksonWeber commented Feb 11, 2025

Which problem is this PR solving?

This PR adds the parentSpanContext to the Span and ReadableSpan in order to adhere to the OTel spec. And removes the parentSpanId as it is now redundant.

Targets main OTel branch and will be accompanies another PR against the 1.x branch: #5422.

Fixes #5345

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Existing tests have been updated to include checks for the new parentSpanContext values and remove those checks for the former parentSpanId value.

Checklist:

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

@JacksonWeber JacksonWeber requested a review from a team as a code owner February 11, 2025 22:52
@JacksonWeber JacksonWeber changed the title Add parentSpanContext and remove parentSpanId. feat: Add parentSpanContext and remove parentSpanId Feb 11, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.97%. Comparing base (14d55d8) to head (b2f9673).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5450   +/-   ##
=======================================
  Coverage   94.97%   94.97%           
=======================================
  Files         309      309           
  Lines        8017     8021    +4     
  Branches     1706     1711    +5     
=======================================
+ Hits         7614     7618    +4     
  Misses        403      403           
Files with missing lines Coverage Δ
...al/packages/otlp-transformer/src/trace/internal.ts 98.46% <100.00%> (+0.07%) ⬆️
...ges/opentelemetry-exporter-jaeger/src/transform.ts 93.33% <100.00%> (ø)
...ges/opentelemetry-exporter-zipkin/src/transform.ts 91.17% <100.00%> (+0.26%) ⬆️
packages/opentelemetry-sdk-trace-base/src/Span.ts 97.70% <100.00%> (ø)
...ackages/opentelemetry-sdk-trace-base/src/Tracer.ts 98.59% <100.00%> (ø)
...y-sdk-trace-base/src/export/ConsoleSpanExporter.ts 82.35% <ø> (ø)

@pichlermarc pichlermarc changed the title feat: Add parentSpanContext and remove parentSpanId feat(sdk-trace-base)!: Add parentSpanContext and remove parentSpanId Feb 13, 2025
CHANGELOG.md Outdated Show resolved Hide resolved
@pichlermarc pichlermarc added the target:next-major-release This PR targets the next major release (`next` branch) label Feb 13, 2025
@pichlermarc pichlermarc added this to the OpenTelemetry SDK 2.0 milestone Feb 13, 2025
@pichlermarc
Copy link
Member

@JacksonWeber it seems that one of the commits modified file permissions (possibly something wrong with your git settings?)

@pichlermarc pichlermarc added this pull request to the merge queue Feb 18, 2025
Merged via the queue into open-telemetry:main with commit 1afa8ba Feb 18, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target:next-major-release This PR targets the next major release (`next` branch)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Span Does Not Reference Parent Span
2 participants