pub struct PrometheusExporter { /* private fields */ }Expand description
Prometheus text format exporter
Implementations§
Source§impl PrometheusExporter
impl PrometheusExporter
Sourcepub fn new(collector: MetricsCollector) -> Self
pub fn new(collector: MetricsCollector) -> Self
Create a new Prometheus exporter
Sourcepub fn with_namespace(
collector: MetricsCollector,
namespace: impl Into<String>,
) -> Self
pub fn with_namespace( collector: MetricsCollector, namespace: impl Into<String>, ) -> Self
Create a new Prometheus exporter with custom namespace
Sourcepub fn collector(&self) -> &MetricsCollector
pub fn collector(&self) -> &MetricsCollector
Get the collector
Sourcepub fn collector_mut(&mut self) -> &mut MetricsCollector
pub fn collector_mut(&mut self) -> &mut MetricsCollector
Get mutable collector
Sourcepub fn set_namespace(&mut self, namespace: impl Into<String>)
pub fn set_namespace(&mut self, namespace: impl Into<String>)
Set the namespace
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PrometheusExporter
impl RefUnwindSafe for PrometheusExporter
impl Send for PrometheusExporter
impl Sync for PrometheusExporter
impl Unpin for PrometheusExporter
impl UnsafeUnpin for PrometheusExporter
impl UnwindSafe for PrometheusExporter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more