Expand description
Observability for jerrycan: request IDs, structured JSON access logs, /healthz, and a Prometheus /metrics endpoint. #![forbid(unsafe_code)].
Re-exports§
pub use metrics::Metrics;
Modules§
- access_
log - Request-id + access logging middleware, and the Observe extension wiring /healthz and /metrics. Logging output is structured JSON via tracing; tests assert behavior (header + metrics endpoints), not log lines.
- metrics
- A tiny global metrics registry rendered as Prometheus text. No histogram crate: counters are atomics, latency is fixed-bucket counters.
Structs§
- Observe
- The observability extension: app-wide access-log middleware + health/metrics routes sharing one metrics registry.
Functions§
- init_
logging - Initialize JSON logging once (call from
mainbefore serving). Idempotent; honorsRUST_LOG. No-op if a global subscriber is already set.