You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
9f282a1e1d
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 ```bash === 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) ``` --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: dmathieu <damien.mathieu@elastic.co>