Skip to content

Fix/issue 6560 install trace bridge test#6814

Merged
dmathieu merged 10 commits intoopen-telemetry:mainfrom
highlyavailable:fix/issue-6560-install-trace-bridge-test
May 26, 2025
Merged

Fix/issue 6560 install trace bridge test#6814
dmathieu merged 10 commits intoopen-telemetry:mainfrom
highlyavailable:fix/issue-6560-install-trace-bridge-test

Conversation

@highlyavailable
Copy link
Copy Markdown
Contributor

Fixes #6560

Summary

Adds tests for the InstallTraceBridge function to verify that the octrace.DefaultTracer is correctly set when the function is called with various configuration options.

Changes

  • Added TestInstallTraceBridge test function in bridge/opencensus/trace_test.go
  • Tests cover multiple scenarios:
    • Installation with default options
    • Installation with custom tracer provider
    • Installation with tracer provider and exporter
  • Verifies that octrace.DefaultTracer is properly updated.
  • Verifies that the installed tracer can create functional spans.
  • Ensures proper cleanup of global state after tests.

Test Results

=== RUN   TestInstallTraceBridge
=== RUN   TestInstallTraceBridge/install_with_default_options
=== RUN   TestInstallTraceBridge/install_with_custom_tracer_provider
=== RUN   TestInstallTraceBridge/install_with_tracer_provider_with_exporter
--- PASS: TestInstallTraceBridge (0.00s)

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

correctly converted from OpenTelemetry to OpenCensus format.

Fixes open-telemetry#6561
@MrAlias MrAlias added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 22, 2025
@highlyavailable highlyavailable force-pushed the fix/issue-6560-install-trace-bridge-test branch 2 times, most recently from 3a8ddb9 to 5f1bb30 Compare May 23, 2025 01:48
highlyavailable and others added 4 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>
@MrAlias MrAlias added this to the v1.37.0 milestone May 23, 2025
@highlyavailable highlyavailable force-pushed the fix/issue-6560-install-trace-bridge-test branch from 5d45827 to 66e7398 Compare May 24, 2025 17:09
…fy that the octrace.DefaultTracer is correctly set when the function is called with various configuration options. Fixes open-telemetry#6560
@highlyavailable highlyavailable force-pushed the fix/issue-6560-install-trace-bridge-test branch from 66e7398 to 7a8b1ad Compare May 24, 2025 17:12
@dmathieu dmathieu merged commit 9f282a1 into open-telemetry:main May 26, 2025
30 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 InstallTraceBridge in the opencensus bridge

3 participants