Observability Configuration
Configuration
Basics
Before getting started, you need to set up or register observability backend services. They can be either managed or self-hosted services that support OpenTelemetry OTLP protocols.
The configuration is identical to the specification of OpenTelemetry OTLP exporter. The minimum configuration are the following environments:
OTEL_EXPORTER_OTLP_ENDPOINT: A base endpoint URL for any signal type, with an optionally-specified port number.OTEL_EXPORTER_OTLP_PROTOCOL: Specifies the OTLP transport protocol to be used for all telemetry data that typically be eitherhttp/protobuforgrpc. Default value isgrpc.
Traces
Traces is enabled by default if OTEL_EXPORTER_OTLP_ENDPOINT environment variable is set. If the Trace receiver
endpoint of the observability service is different from other data types, you can configure a custom endpoint with the
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable.
Metrics
You can export either Prometheus or OTLP via the OTEL_METRICS_EXPORTER environment variable.
prometheus: export metrics to the/metricsendpoint. The Prometheus server can scrape metrics from this endpoint. If you want customize a different port for the exporter, setting theOTEL_EXPORTER_PROMETHEUS_PORTenvironment variable.otlp: export metrics to a remote observability service via the OTLP protocol. The endpoint is configured viaOTEL_EXPORTER_OTLP_ENDPOINTenvironment variable. If the metrics endpoint is different from other data types, you can configure a custom endpoint with theOTEL_EXPORTER_OTLP_METRICS_ENDPOINTenvironment variable.none: Disable metrics (default).
Logs
Logs are disabled by default. Setting OTEL_LOGS_EXPORTER=otlp environment variable to enable it. The endpoint is
configured via OTEL_EXPORTER_OTLP_ENDPOINT environment variable. If the logs endpoint is different from other data
types, you can configure a custom endpoint with the OTEL_EXPORTER_OTLP_LOGS_ENDPOINT environment variable.