Tracing block

Cerbos supports distributed tracing to provide insights into application performance and request lifecycle. To enable tracing, set sampleProbability to a value between 0.0 and 1.0. Setting the probability to 1.0 makes Cerbos capture tracing information for all requests and setting it to 0.0 disables capturing any traces.

The system to export the trace data must be specified using the exporter setting. Currently Jaeger and OTLP collectors are supported. If using Jaeger, traces can be sent to either a Jaeger Agent (compact Thrift format) or a Jaeger Collector (Thrift format).

OpenTelemetry

OpenTelemetry is the evolving standard for observability. Cerbos supports OpenTelemetry with a few caveats due to limitations in the current Go implementation of OpenTelemetry.

Jaeger

Send trace data to Jaeger Agent (compact Thrift)
tracing:
  serviceName: cerbos
  sampleProbability: 0.5
  exporter: jaeger
  jaeger:
    agentEndpoint: "localhost:6831"
Send trace data to Jaeger Collector (Thrift)
tracing:
  serviceName: cerbos
  sampleProbability: 0.5
  exporter: jaeger
  jaeger:
    collectorEndpoint: "http://localhost:14268/api/traces"

OTLP

Send trace data to an OTLP collector
tracing:
  serviceName: cerbos
  sampleProbability: 0.5
  exporter: otlp
  otlp:
    collectorEndpoint: "otel:4317"