0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-11-05 00:27:05 +00:00
renovatebot_renovate/docs/usage/opentelemetry.md
AvivGuiser 4914b6c26c
feat(instrumentation): add option to overwrite otlp service name/namespace/version with env var (#29583)
Signed-off-by: Aviv Guiser <avivguiser@gmail.com>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2024-06-12 10:24:45 +00:00

2.0 KiB

title description
OpenTelemetry How to use OpenTelemetry with Renovate

OpenTelemetry and Renovate

!!! warning "This feature is flagged as experimental" Experimental features might be changed or even removed at any time.

Renovate partially supports OpenTelemetry, the emerging monitoring standard.

OpenTelemetry has three types of observability data:

  • traces
  • metrics
  • logs

Limitations

While OTLP support traces, metrics, and logs, Renovate only supports traces. This means Renovate does not support other observability data like: stats on caching, error events, number of found updates, and so on.

Renovate uses @opentelemetry/exporter-trace-otlp-http under the hood. This means that Renovate sends traces via OTLP/HTTP in JSON-encoded protobuf format only.

Usage

To activate the instrumentation, you must set the OTEL_EXPORTER_OTLP_ENDPOINT environment variable. This variable controls the endpoint for the telemetry data. Once this endpoint is set, you can use all environment variables listed in the OpenTelemetry specification. You can also set the following environment variables:

  • OTEL_SERVICE_NAME: to control the service name that will be emitted in traces, defaults to renovate
  • OTEL_SERVICE_NAMESPACE: to control the service namespace that will be emitted in traces, defaults to renovatebot.com
  • OTEL_SERVICE_VERSION: to control the service version that will be emitted in traces, defaults to using the release version of Renovate

Debugging

To help you debug, you can print the telemetry to the console. Use the environment variable RENOVATE_TRACING_CONSOLE_EXPORTER.

Examples

An example with a local OpenTelemetry setup can be found on the OpenTelemetry examples page.