sentry_core

Module cadence

Source
Expand description

cadence integration for Sentry.

cadence is a popular Statsd client for Rust. The SentryMetricSink provides a drop-in integration to send metrics captured via cadence to Sentry. For direct usage of Sentry metrics, see the metrics module.

§Usage

To use the cadence integration, enable the metrics-cadence1 feature in your Cargo.toml. Then, create a SentryMetricSink and pass it to your cadence client:

use cadence::StatsdClient;
use sentry::cadence::SentryMetricSink;

let client = StatsdClient::from_sink("sentry.test", SentryMetricSink::new());

§Side-by-side Usage

If you want to send metrics to Sentry and another backend at the same time, you can use SentryMetricSink::wrap to wrap another MetricSink:

use cadence::{StatsdClient, NopMetricSink};
use sentry::cadence::SentryMetricSink;

let sink = SentryMetricSink::wrap(NopMetricSink);
let client = StatsdClient::from_sink("sentry.test", sink);

Structs§