pub trait MetricsSource: Send + 'static {
// Required method
fn encode_openmetrics(&self) -> Result<String, Error>;
}
Available on crate feature
service
only.Expand description
Helper trait to abstract over different ways to access metrics.
Required Methods§
Sourcefn encode_openmetrics(&self) -> Result<String, Error>
fn encode_openmetrics(&self) -> Result<String, Error>
Encodes all metrics into a string in the Open Metrics text format.
Implementations on Foreign Types§
Source§impl MetricsSource for Arc<Registry>
impl MetricsSource for Arc<Registry>
Implementors§
impl MetricsSource for GlobalRegistry
Available on crate feature
static_core
only.