pub struct CounterMetric { /* private fields */ }Expand description
A counter metric, created with counter.
Implementations§
Source§impl CounterMetric
impl CounterMetric
Sourcepub fn attribute<K, V>(self, key: K, value: V) -> Self
pub fn attribute<K, V>(self, key: K, value: V) -> Self
Adds an attribute to the metric.
Attributes are keys that can be used to filter and group metrics in Sentry. Multiple attributes can be chained. We recommend using Sentry semantic conventions for key values, where applicable.
Sourcepub fn capture(self)
pub fn capture(self)
Captures the metric on the current Hub, sending it to Sentry.
If the current hub has no client bound, the metric is dropped. To capture on a
different hub, use Hub::capture_metric.
Trait Implementations§
impl IntoProtocolMetric for CounterMetric
Auto Trait Implementations§
impl Freeze for CounterMetric
impl RefUnwindSafe for CounterMetric
impl Send for CounterMetric
impl Sync for CounterMetric
impl Unpin for CounterMetric
impl UnsafeUnpin for CounterMetric
impl UnwindSafe for CounterMetric
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