-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Goal\n----\nImplement optional, fully configurable observability for the FastAPI backend.\n\nAcceptance criteria\n-------------------\n1. New Settings flags:\n • OBSERVABILITY_ENABLED (master switch)\n • OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_TRACES_ENABLED, OTEL_METRICS_ENABLED, OTEL_TRACES_SAMPLER_RATIO\n • LOKI_ENABLED, LOKI_ENDPOINT, LOKI_EXTRA_LABELS\n2. Observability initialiser module that:\n • Exposes Prometheus /metrics via prometheus-fastapi-instrumentator\n • Sets up OpenTelemetry tracing (FastAPIInstrumentor) + OTLP exporter\n • Optionally exports metrics via OTLP when enabled\n • Adds logging-loki handler when enabled\n • Fails gracefully if deps/endpoint missing.\n3. FastAPI app calls the initialiser on startup.\n4. All new code covered by type-checking and passes lint/tests.\n\nContext: Work already implemented in branch; this issue used for audit trail.