Skip to main content

Module prom

Module prom 

Source
Expand description

Shared Prometheus registry/counter helpers used by per-connector metric structs. Shared Prometheus counter/gauge construction for per-connector metric structs. Replaces the per-file let local; let reg = … boilerplate and reg_c! macros that used to be duplicated in eleven places.

Structs§

RegHandle
Borrowed registry handle used during metric-struct construction.

Functions§

reg_or_local
RegHandle over registry, falling back to a fresh registry parked in local (which must outlive construction). Pattern: let mut local = None; let reg = reg_or_local(registry, &mut local);