pub struct DistributionMetric { /* private fields */ }Expand description
A distribution metric, created with distribution.
Implementations§
Source§impl DistributionMetric
impl DistributionMetric
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§
Auto Trait Implementations§
impl Freeze for DistributionMetric
impl RefUnwindSafe for DistributionMetric
impl Send for DistributionMetric
impl Sync for DistributionMetric
impl Unpin for DistributionMetric
impl UnsafeUnpin for DistributionMetric
impl UnwindSafe for DistributionMetric
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