Skip to content

Add observability (metrics, tracing, logging) integration #1

@pmcfadin

Description

@pmcfadin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions