Skip to content

Observability port

Definition

Hexagonal port for the observability boundary (ADR-0044 P7.7). Exposes five methods: capture_exception, capture_message, breadcrumb, set_measurement, and flush. Sentry was removed by ADR-0118 (observability moves to a dedicated SRE agent targeting New Relic), so the production adapter is now NoOpObservabilityAdapter in src/observability/noop_adapter.py — a null object whose methods return silently — and the SRE agent will supply the real adapter for this seam. The port is intentionally minimal — rich APIs drag every backend into the union.

Invariants

  • Pure Protocol — no implementation, no state.
  • The production adapter (NoOpObservabilityAdapter) is a null object; every method returns silently so callers never need a try/except around port calls.
  • Domain code never imports an observability SDK directly; all observability routes through the injected ObservabilityPort so the SRE agent's future adapter (New Relic, OTLP, structured-log, or sidecar) can replace the no-op without touching call sites.