Skip to content

debug: OpenTelemetry http/json tunnel on /-/debug/otlp

Created by: bobheadxi

Adds an OpenTelemetry protocol (OTLP) adapter tunnel through the frontend (backend), /-/debug/otlp, that accepts http/json OTLP requests and sends them to either a grpc or http/json OpenTelemetry collector (depending on the configured protocol).

We build an adapter because the OpenTelemetry collector is gRPC by default in most of its guidance, while browser environments can only support the http/json protocol. This allows admins to use their preferred OpenTelemetry backend of choice without worrying about compatibility with the http/json protocol. This is done by (ab)using OpenTelemetry collector (not the Go API) packages to partially implement an OpenTelemetry receiver on /-/debug/otlp - see the otlpadapter package for more details.

See the git history of this PR for an alternative approach, which adds an additional environment variable to configure an http/json backend.

Test plan

We use any blob page for testing, since it appears to be one of the few pages instrumented with traces.

With http/json:

image

With grpc:

image

Merge request reports

Loading