Skip to main content

gather_metrics

Function gather_metrics 

Source
pub fn gather_metrics() -> String
Expand description

Gather and encode all metrics in the Prometheus text exposition format.

Returns an empty string if metrics have not been initialised or if encoding fails. Observability degrades gracefully rather than panicking.

ยงPanics

This function never panics.