Skip to content

bridge/opencensus: add test for OTelSpanContextToOC function#6813

Merged
MrAlias merged 6 commits intoopen-telemetry:mainfrom
highlyavailable:main
May 23, 2025
Merged

bridge/opencensus: add test for OTelSpanContextToOC function#6813
MrAlias merged 6 commits intoopen-telemetry:mainfrom
highlyavailable:main

Conversation

@highlyavailable
Copy link
Copy Markdown
Contributor

Description

Adds tests for the OTelSpanContextToOC func in the opencensus bridge as requested in issue #6561.

Changes

  • Added TestOTelSpanContextToOC function with four test cases:
    • Empty span context conversion
    • Sampled span context conversion
    • Not sampled span context conversion
    • Span context with tracestate conversion

Testing

The test verifies that the following fields are correctly converted:

  • TraceID
  • SpanID
  • TraceOptions (sampled/not sampled)
  • Tracestate (when present)

All existing tests continue to pass.

Fixes

Closes #6561

…st verifies that TraceID, SpanID, TraceOptions, and Tracestate are

correctly converted from OpenTelemetry to OpenCensus format.

Fixes open-telemetry#6561
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented May 22, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

highlyavailable and others added 3 commits May 23, 2025 06:40
Remove verbose comment

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Remove verbose comment

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Remove verbose comment

Co-authored-by: Damien Mathieu <42@dmathieu.com>
@highlyavailable
Copy link
Copy Markdown
Contributor Author

@dmathieu Thanks for the feedback, I removed the verbose comments.

@dmathieu dmathieu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 23, 2025
@MrAlias MrAlias added this to the v1.37.0 milestone May 23, 2025
@MrAlias MrAlias merged commit 607db85 into open-telemetry:main May 23, 2025
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test OTelSpanContextToOC in the opencensus bridge

3 participants