Chaos Proxy supports optional OpenTelemetry tracing and a local observability stack.
otelmiddleware with W3Ctraceparentpropagation- OTLP HTTP trace export to OpenTelemetry Collector
- Jaeger for trace exploration
- Prometheus for metrics (via collector spanmetrics)
- Grafana with a pre-provisioned dashboard
If otel is not configured, Chaos Proxy runs without telemetry export.
Use the built-in scripts:
npm run obs:upnpm run obs:validatenpm run obs:psnpm run obs:logsnpm run obs:downnpm run obs:reset
Endpoints:
- Grafana:
http://localhost:3000 - Prometheus:
http://localhost:9090 - Jaeger:
http://localhost:16686 - Collector OTLP:
http://localhost:4318(HTTP),localhost:4317(gRPC)
otel is a top-level config object in chaos.yaml.
target: "http://localhost:4000"
port: 5000
otel:
serviceName: "checkout-api"
endpoint: "http://localhost:4318"
flushIntervalMs: 1000
maxBatchSize: 20
maxQueueSize: 1000
headers:
x-tenant-id: "local-dev"
global:
- latencyRange:
minMs: 20
maxMs: 120Options:
serviceName(required): service name label in tracesendpoint(required): OTLP base endpointflushIntervalMs(optional): export interval, default5000maxBatchSize(optional): batch size, default100maxQueueSize(optional): max queued spans, default1000headers(optional): extra OTLP request headers
Behavior notes:
- Existing incoming
traceparentis continued. - Missing incoming
traceparentstarts a new trace. - Spans are marked as errors for HTTP status >= 400 or thrown middleware errors.
otelis resolved beforeglobalmiddleware.
Dashboard name: Chaos Proxy Observability
Dashboard UID: chaos-proxy-observability
If no data appears:
- Check services with
npm run obs:ps. - Check collector targets in Prometheus at
http://localhost:9090/targets. - Check traces in Jaeger using your configured
serviceName. - Confirm Grafana datasource points to
http://prometheus:9090. - Hard refresh Grafana after dashboard changes.