Skip to main content

Observability

Metrics and tracing are configured under a single observability section. Both are independently enableable. This page covers only the enabling/toggle configuration - for available metrics, Grafana panels, and error-kind labels see Metrics; for span structure, attributes, and sampling see Tracing.

gateway:
observability:
metrics:
enabled: true
exporter: prometheus
otlp:
endpoint: otel-collector:4318
insecure: true
interval: 10s
tracing:
enabled: true
exporter: otlp
sampling_ratio: 1.0
otlp:
endpoint: otel-collector:4318
insecure: true
interval: 10s
FieldTypeRequiredDefaultDescription
metrics.enabledboolfalsefalseEnable metrics instrumentation
metrics.exporterstringif enabled-prometheus or otlp
metrics.otlp.endpointstringif otlp-OTLP HTTP endpoint (e.g. otel-collector:4318)
metrics.otlp.insecureboolfalsefalseDisable TLS for the OTLP connection
metrics.otlp.intervaldurationfalse60sPush interval for OTLP metrics
tracing.enabledboolfalsefalseEnable trace export
tracing.exporterstringif enabled-otlp (only OTLP is supported)
tracing.sampling_ratiofloatfalse1.0Fraction of traces to sample, between 0 and 1
tracing.otlp.endpointstringif enabled-OTLP HTTP endpoint for trace export
tracing.otlp.insecureboolfalsefalseDisable TLS for the OTLP connection
tracing.otlp.intervaldurationfalse60sBatch span export interval

Metrics: with exporter: prometheus, the /metrics endpoint is served on the admin port, not the data port. This means Prometheus does not need a client certificate even when the data port enforces mTLS. With exporter: otlp, no endpoint is exposed - metrics are pushed on the configured interval. See the Metrics page for available metrics and Grafana setup.

Trace propagation: Aastro installs the standard W3C Trace Context propagator unconditionally - even when tracing.enabled: false. Incoming traceparent headers are extracted and propagated to upstreams regardless of whether Aastro itself exports spans. This preserves distributed tracing context across deployments that haven't enabled the OTLP exporter yet.

tip

sampling_ratio: 1.0 exports every trace, which is fine for low-traffic services and indispensable during debugging, but expensive at scale. For high-RPS production deployments consider 0.01 to 0.1 (1-10% sampling). Span data volume scales linearly with this value.