pub struct DatadogObserver { /* private fields */ }Expand description
Publishes DialCache diagnostics to DogStatsD. Counters increment by one per event; observations use the configured metric type.
Implementations§
Source§impl DatadogObserver
impl DatadogObserver
Sourcepub fn new(
client: impl DogStatsdClient,
options: DatadogOptions,
) -> Result<DatadogObserver, DatadogError>
pub fn new( client: impl DogStatsdClient, options: DatadogOptions, ) -> Result<DatadogObserver, DatadogError>
Validate the namespace and precompute every metric name. Fails when
the namespace is invalid or a name would exceed
METRIC_NAME_MAX_LENGTH.
Sourcepub fn metric_name(&self, kind: MetricKind) -> &str
pub fn metric_name(&self, kind: MetricKind) -> &str
The full metric name of kind under this observer’s namespace.
Trait Implementations§
Source§impl Debug for DatadogObserver
impl Debug for DatadogObserver
Source§impl Observer for DatadogObserver
impl Observer for DatadogObserver
Auto Trait Implementations§
impl !RefUnwindSafe for DatadogObserver
impl !UnwindSafe for DatadogObserver
impl Freeze for DatadogObserver
impl Send for DatadogObserver
impl Sync for DatadogObserver
impl Unpin for DatadogObserver
impl UnsafeUnpin for DatadogObserver
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