Aller au contenu principal

Observability

SignalImplementationDestination (production)
Logspkg/logging: slog JSON on stdout, enriched with trace and span IDsLoki
Tracespkg/telemetry: OpenTelemetry SDK, OTLP gRPC export when OTEL_EXPORTER_OTLP_ENDPOINT is set; Gin instrumented with otelginTempo
MetricsOpenTelemetry → Prometheus exporter, served on METRICS_ADDR (/metrics, private listener)Prometheus
Alerts— (planned: Alertmanager → notifications service + alert mailing list)
  • Correlation: the request ID (pkg/httpx) travels in the principal token (rid) and in audit records (request_id, trace_id). Incoming HTTP requests are traced by otelgin; Kafka events carry the W3C traceparent (CloudEvents) and consumers continue the trace.
  • Gap: the authz ConnectRPC client (pkg/authzclient) is a plain http.Client without trace propagation, so permission checks are not linked to the caller trace yet.
  • Health: /healthz (liveness, always 200) and /readyz (readiness: MongoDB, Kafka, Permify, immudb… registered per service). Health requests are excluded from access logs.
  • vision (Python): JSON logs, OpenTelemetry tracing over OTLP/HTTP, Prometheus /metrics on the main port.

The monitoring stack (Grafana, Loki, Tempo, Prometheus, Alertmanager) is not part of the local compose file.