Skip to content

internal/tracer: use OpenTelemetry to do native Jaeger export

Administrator requested to merge jaeger-otel-exporter into main

Created by: bobheadxi

Since we can provide a Jaeger exporter directly to the OpenTelemetry library, this allows us to provide capabilities similar to before while removing our dependency on OpenTracing/Jaeger, allowing us to streamline internal/trace considerably (https://github.com/sourcegraph/sourcegraph/pull/40710) and allows the codebase to freely use OpenTracing or OpenTelemetry without worrying about compatibility (e.g. without this change, OpenTelemetry instrumentation like #39300 would not export via "observability.tracing": { "type": "jaeger" }".

This likely negates any real need for the original intent of https://github.com/sourcegraph/sourcegraph/issues/39399, which was to remove the Jaeger exporter option, because working with both libraries is now less of a concern, so I've adjusted the scope of that issue accordingly.

Test plan

  "observability.tracing": {
    "sampling": "selective",
    "type": "jaeger",
    "debug": false
  },

then sg start and sg run jaeger (without opentelemetry collector running)

Then &trace=1:

image

Merge request reports

Loading