Skip to main content

Module obs

Module obs 

Source
Expand description

Observability facade: Prometheus metrics + structured audit log.

Every recording function here is a thin wrapper that compiles to a no-op unless the metrics feature is enabled. This keeps instrumentation call sites in the OCSP hot path free of #[cfg] noise and imposes zero cost on the default build. The audit log (audit!) is always active — it is a tracing event on the dedicated audit target, which existing subscribers can route to their own sink.

Design reference: hoike-design.md §9 (metric surface).

Macros§

audit
Emit a structured audit event on the audit tracing target.

Functions§

install
load_failure_reason
Classify a bundle load/reload error into a stable reason label for the hoike_bundle_load_failures_total counter. Anti-rollback and continuity violations are the operationally interesting cases; everything else collapses to coarse buckets. Always available (no metrics dep) so call sites can classify even in the default build.
record_bundle_load_failure
record_certid_alg
record_gossip_members
record_nonce
record_request
record_request_duration
record_signer_generation
render
update_bundle_gauges