This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/tracer: correctly set Tracer names in OpenTracing bridge (#4…
…0945) The existing wrapped OpenTelemetry TracerProvider for bridging OpenTracing API calls to OpenTelemetryAPI calls discards the name provided to the `Tracer()` constructor on it, since it uses a fixed tracer that we provide it. This change leverages an upstream patch, open-telemetry/opentelemetry-go#3116 (dependency update: https://github.com/sourcegraph/sourcegraph/pull/47126), that allows wrapped tracers to be created on the fly with the provided parameters, so that we can more accurately see the instrumentation source. ## Test plan Via the bridge, we can see that the Tracer used is the bridge tracer: <img width="1322" alt="image" src="https://user-images.githubusercontent.com/23356519/186957763-60faee32-e6a5-4bda-bb64-fddb82eacc0d.png"> Via direct usage of OpenTelemetry, we can see that the Tracer used has the custom name set: <img width="1448" alt="image" src="https://user-images.githubusercontent.com/23356519/186957773-c6ff7643-3f89-498d-857b-1dd79b36508d.png">
- Loading branch information