OpenTelemetry deployment
The Compose stack pins Collector Contrib 0.163.2, Prometheus 2.55.1, Loki 3.3.2, Tempo 2.7.1, and Grafana 11.4.0. OTLP gRPC/HTTP listeners and backend query ports are private to the Compose network; only the API load balancer and Grafana UI bind to loopback.
collector.yaml receives all three OTLP signals. Metrics are exposed to Prometheus on the private Collector endpoint; logs are exported to Loki's OTLP receiver and traces to Tempo. Memory limiter and batch processors bound Collector memory. Trace/log exporter queues are capped at 256 requests and retry for at most 30 seconds; SDK span/log queues are capped at 4096 records with batches of at most 512. On backend outage, telemetry is dropped after bounded retries rather than blocking API work indefinitely. Metrics are pull-exported and can be missed while Prometheus is unavailable.
Loki, Tempo, and Prometheus retain local data in named volumes. Grafana datasources, the dashboard, and Prometheus alert rules are provisioned from this directory. Prometheus evaluates the 7-day rolling API availability SLI and local alerts; use the alert annotations and REPORT.md runbooks to investigate.
API, publisher, and worker share a W3C trace context through the database outbox and the broker payload. Application logs contain only structured metadata, trace/span IDs, request IDs, route templates, and sanitized event names. Message bodies, credentials, filenames, and signed URLs are not exported.