Configure Observability Latest

Prometheus metrics, OpenTelemetry tracing, and request logging configuration for the interceptor

Suggest a change

The interceptor exposes metrics and tracing data to help monitor HTTP traffic and scaling behavior. All observability settings are configured via environment variables, set through the interceptor.extraEnvs Helm value.

Prometheus metrics

The interceptor exposes Prometheus metrics at /metrics on port 2223. This is enabled by default.

Env varDefaultDescription
OTEL_PROM_EXPORTER_ENABLEDtrueEnable the Prometheus metrics endpoint.
OTEL_PROM_EXPORTER_PORT2223Port for the Prometheus metrics endpoint.

See Metrics Reference for the full list of metrics and labels.

OpenTelemetry tracing

Enable distributed tracing via OTLP:

helm upgrade http-add-on kedacore/keda-add-ons-http \
  --namespace keda \
  --set interceptor.extraEnvs.OTEL_EXPORTER_OTLP_TRACES_ENABLED=true \
  --set interceptor.extraEnvs.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc \
  --set interceptor.extraEnvs.OTEL_EXPORTER_OTLP_ENDPOINT=http://<your-otel-collector>:4317

The interceptor uses W3C TraceContext and Baggage propagation.

Env varDefaultDescription
OTEL_EXPORTER_OTLP_TRACES_ENABLEDfalseEnable OTLP trace export.
OTEL_EXPORTER_OTLP_TRACES_PROTOCOLconsoleExporter protocol (grpc, http/protobuf, console).
OTEL_EXPORTER_OTLP_ENDPOINTCollector endpoint URL.
OTEL_EXPORTER_OTLP_HEADERSAuthentication headers (e.g., api-key=<token>).
OTEL_EXPORTER_OTLP_TRACES_TIMEOUT10sTimeout for trace export requests.

OpenTelemetry metrics

Enable OTLP metrics export alongside or instead of Prometheus:

helm upgrade http-add-on kedacore/keda-add-ons-http \
  --namespace keda \
  --set interceptor.extraEnvs.OTEL_EXPORTER_OTLP_METRICS_ENABLED=true \
  --set interceptor.extraEnvs.OTEL_EXPORTER_OTLP_ENDPOINT=http://<your-otel-collector>:4317
Env varDefaultDescription
OTEL_EXPORTER_OTLP_METRICS_ENABLEDfalseEnable OTLP metrics export.
OTEL_EXPORTER_OTLP_ENDPOINTCollector endpoint URL (shared with traces if set).
OTEL_EXPORTER_OTLP_HEADERSAuthentication headers (shared with traces if set).
OTEL_METRIC_EXPORT_INTERVAL60sInterval between periodic metric exports.

Request logging

Enable Combined Log Format request logging:

helm upgrade http-add-on kedacore/keda-add-ons-http \
  --namespace keda \
  --set interceptor.extraEnvs.KEDA_HTTP_LOG_REQUESTS=true

What’s Next