pub struct SentryRecorder { /* private fields */ }
Expand description
A Sentry recorder for metrics.
Exports all collected metrics to Sentry Metrics.
Implementations§
Source§impl SentryRecorder
impl SentryRecorder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SentryRecorder
emitting to metrics to sentry::Hub::current()
.
Note: There is no install
or similar convenience method to install the recorder,
it needs to be explicitly set using metrics::set_global_recorder
to prevent
dependency version mismatches.
§Examples
use metrics_exporter_sentry::SentryRecorder;
metrics::set_global_recorder(SentryRecorder::new()).unwrap();
Trait Implementations§
Source§impl Default for SentryRecorder
impl Default for SentryRecorder
Source§impl Recorder for SentryRecorder
impl Recorder for SentryRecorder
Source§fn describe_counter(
&self,
key: KeyName,
unit: Option<Unit>,
_description: SharedString,
)
fn describe_counter( &self, key: KeyName, unit: Option<Unit>, _description: SharedString, )
Describes a counter. Read more
Source§fn describe_gauge(
&self,
key: KeyName,
unit: Option<Unit>,
_description: SharedString,
)
fn describe_gauge( &self, key: KeyName, unit: Option<Unit>, _description: SharedString, )
Describes a gauge. Read more
Source§fn describe_histogram(
&self,
key: KeyName,
unit: Option<Unit>,
_description: SharedString,
)
fn describe_histogram( &self, key: KeyName, unit: Option<Unit>, _description: SharedString, )
Describes a histogram. Read more
Auto Trait Implementations§
impl Freeze for SentryRecorder
impl RefUnwindSafe for SentryRecorder
impl Send for SentryRecorder
impl Sync for SentryRecorder
impl Unpin for SentryRecorder
impl UnwindSafe for SentryRecorder
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