Struct sentry_core::cadence::SentryMetricSink
source · pub struct SentryMetricSink<S = NopMetricSink> { /* private fields */ }Expand description
A MetricSink that sends metrics to Sentry.
This metric sends all metrics to Sentry. The Sentry client is internally buffered, so submission will be delayed.
Optionally, this sink can also forward metrics to another MetricSink. This is useful if you
want to send metrics to Sentry and another backend at the same time. Use
SentryMetricSink::wrap to construct such a sink.
Implementations§
source§impl<S> SentryMetricSink<S>where
S: MetricSink,
impl<S> SentryMetricSink<S>where
S: MetricSink,
sourcepub fn wrap(sink: S) -> Self
pub fn wrap(sink: S) -> Self
Creates a new SentryMetricSink, wrapping the given MetricSink.
sourcepub fn with_client(self, client: Arc<Client>) -> Self
pub fn with_client(self, client: Arc<Client>) -> Self
Creates a new SentryMetricSink sending data to the given Client.
source§impl SentryMetricSink
impl SentryMetricSink
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SentryMetricSink.
It is not required that a client is available when this sink is created. The sink sends metrics to the client of the Sentry hub that is registered when the metrics are emitted.
Trait Implementations§
source§impl<S: Debug> Debug for SentryMetricSink<S>
impl<S: Debug> Debug for SentryMetricSink<S>
source§impl Default for SentryMetricSink
impl Default for SentryMetricSink
Auto Trait Implementations§
impl<S> RefUnwindSafe for SentryMetricSink<S>where
S: RefUnwindSafe,
impl<S> Send for SentryMetricSink<S>where
S: Send,
impl<S> Sync for SentryMetricSink<S>where
S: Sync,
impl<S> Unpin for SentryMetricSink<S>where
S: Unpin,
impl<S> UnwindSafe for SentryMetricSink<S>where
S: UnwindSafe,
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