Skip to main content

Tracing

Gate supports distributed tracing via the OpenTelemetry OTLP exporter. Traces can be exported to any OTLP-compatible backend (Jaeger, Grafana Tempo, Honeycomb, etc.).

Service name

The service_name field sets the service name attached to all traces and log records. It is a top-level field under gate::

GATE_SERVICE_NAME=my-gate

OpenTelemetry exporter

Use tracing.exporter.opentelemetry to export traces to an OTLP endpoint:

GATE_SERVICE_NAME=my-gate
GATE_TRACING_EXPORTER_OPENTELEMETRY_ENABLED=true
GATE_TRACING_EXPORTER_OPENTELEMETRY_ENDPOINT=http://otel-collector:4317
GATE_TRACING_EXPORTER_OPENTELEMETRY_PROTOCOL=grpc
GATE_TRACING_EXPORTER_OPENTELEMETRY_HEADERS_<HEADER_NAME>=<Header value>
GATE_TRACING_SAMPLE_PROBABILITY=1.0

Parameters

ParameterDescriptionDefault
enabledEnable the exporterfalse
endpointOTLP collector endpoint URL
protocolTransport protocol: grpc (port 4317) or http (port 4318)grpc
headersAdditional headers to send with each export request (key/value map)

Sampling

The tracing.sample.probability field controls the fraction of requests that are traced (0.0–1.0). The default is 1.0 (100%).

Sending traces to Jaeger

danger

The tracing.exporter.jaeger configuration (Jaeger Thrift protocol) is deprecated. Use tracing.exporter.opentelemetry instead — Jaeger 1.35+ accepts OTLP directly.

Point Gate at Jaeger's OTLP gRPC port (4317):

gate:
service_name: my-gate
tracing:
exporter:
opentelemetry:
enabled: true
endpoint: http://jaeger:4317
protocol: grpc