Observability
Logging
Section titled “Logging”Python (config/logging.py) emits structured JSON logs (LOG_FORMAT=json) with OpenTelemetry trace/span IDs. Notable details:
DropRootNoiseFiltersuppresses noisy root loggers.- A dedicated filter tames the jarm coroutine warning.
- Business events log with
extra={...}payloads (e.g.report_ai_provider_unavailablecarriesreasonandprovider_type).
Rails logs to the standard Rails logger (RAILS_LOG_LEVEL / log/).
Tracing
Section titled “Tracing”The Python FastAPI app is instrumented with OpenTelemetry (FastAPIInstrumentor.instrument_app), so trace and span IDs flow through every JSON log line, letting you correlate logs to a single scan/finding operation.
Health checks
Section titled “Health checks”| Endpoint | Service | Notes |
|---|---|---|
GET /up |
Rails | Liveness; used by the e2e wait loop |
GET /health |
Python | Liveness; the only unauthenticated Python route |