Skip to content
CommonLayer
Documentation menu
On this page

ADR-0018: commonlayer-observability is an allowed dependency of domain crates

Status: Accepted (recorded as a deviation by WP-11, WP-12, WP-14 and WP-15).

Context

The crate table in the plan did not list commonlayer-observability as a dependency of most domain crates. At the same time every metric must be recorded through the single metric catalog (commonlayer_observability::metrics::catalog) so that names, labels and the generated docs/operations/metrics.md cannot drift.

Decision

Domain crates may depend on commonlayer-observability. It is a foundation crate with no domain logic and no dependency on any domain, so the dependency graph stays acyclic and domain crates still do not depend on each other.

Consequences

  • The artifacts, registry, security, funding, GitHub and notifications crates record their counters and histograms directly through the catalog constants.
  • The maintenance crate kept the original rule and does not depend on observability; its job reports return counts that the composition root records (commonlayer_eligibility_evaluations_total).
  • Business gauges are still computed by the scheduler process only, so they are not duplicated across API replicas.