pub struct PrometheusRecorder { /* private fields */ }
Expand description
A Prometheus recorder.
This recorder should be composed with other recorders or installed globally via
metrics::set_boxed_recorder
.
Most users will not need to interact directly with the recorder, and can simply deal with the
builder methods on PrometheusBuilder
for building and installing
the recorder/exporter.
Implementations
sourceimpl PrometheusRecorder
impl PrometheusRecorder
sourcepub fn handle(&self) -> PrometheusHandle
pub fn handle(&self) -> PrometheusHandle
Gets a PrometheusHandle
to this recorder.
Trait Implementations
sourceimpl Recorder for PrometheusRecorder
impl Recorder for PrometheusRecorder
sourcefn describe_counter(
&self,
key_name: KeyName,
_unit: Option<Unit>,
description: &'static str
)
fn describe_counter(
&self,
key_name: KeyName,
_unit: Option<Unit>,
description: &'static str
)
Describes a counter. Read more
sourcefn describe_gauge(
&self,
key_name: KeyName,
_unit: Option<Unit>,
description: &'static str
)
fn describe_gauge(
&self,
key_name: KeyName,
_unit: Option<Unit>,
description: &'static str
)
Describes a gauge. Read more
sourcefn describe_histogram(
&self,
key_name: KeyName,
_unit: Option<Unit>,
description: &'static str
)
fn describe_histogram(
&self,
key_name: KeyName,
_unit: Option<Unit>,
description: &'static str
)
Describes a histogram. Read more
sourcefn register_counter(&self, key: &Key) -> Counter
fn register_counter(&self, key: &Key) -> Counter
Registers a counter.
sourcefn register_gauge(&self, key: &Key) -> Gauge
fn register_gauge(&self, key: &Key) -> Gauge
Registers a gauge.
sourcefn register_histogram(&self, key: &Key) -> Histogram
fn register_histogram(&self, key: &Key) -> Histogram
Registers a histogram.
Auto Trait Implementations
impl !RefUnwindSafe for PrometheusRecorder
impl Send for PrometheusRecorder
impl Sync for PrometheusRecorder
impl Unpin for PrometheusRecorder
impl !UnwindSafe for PrometheusRecorder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more