Skip to content

web: integrate OpenTelemetry client observability packages

Warren Gifford requested to merge vb/otel-tracer into main

Created by: valerybugakov

Context

Add basic configuration of the OpenTelemetry tracing to the web application. Based on prior work. Honeycomb guide.

Changes

  1. Removed ENABLE_MONITORING env variable in favor of ENABLE_SENTRY and ENABLE_OPEN_TELEMETRY. Required for standalone-web-server in the development environment to avoid accidentally sending telemetry data from the local env.

  2. Integrated @opentelemetry packages and moved them into a separate chunk. Added new script tags required for the new initial chunk.

    Screen Shot 2022-07-28 at 13 03 46
  3. Enabled @opentelemetry/instrumentation-fetch.

    image

Note: we won't be collecting data until the backend tunnel PR is merged.

Closes https://github.com/sourcegraph/sourcegraph/issues/39273 Closes https://github.com/sourcegraph/sourcegraph/issues/39281

Test plan

  1. Checkout to https://github.com/sourcegraph/sourcegraph/pull/39453
  2. Set dev-private site config to use opentelemetry
  3. Set observability.client in the site config.
  4. sg start otel
  5. sg start
  6. Open a web page with API requests.
  7. See traces logged to Jaeger.

Merge request reports

Loading