pub struct Metrics {
pub statsd: Option<String>,
pub prefix: String,
pub default_tags: BTreeMap<String, String>,
pub hostname_tag: Option<String>,
pub sample_rate: f32,
pub periodic_secs: u64,
pub aggregate: bool,
}
Expand description
Control the metrics.
Fields§
§statsd: Option<String>
Hostname and port of the statsd server.
Defaults to None
.
prefix: String
Common prefix that should be added to all metrics.
Defaults to "sentry.relay"
.
Default tags to apply to all metrics.
hostname_tag: Option<String>
Tag name to report the hostname to for each metric. Defaults to not sending such a tag.
sample_rate: f32
Global sample rate for all emitted metrics between 0.0
and 1.0
.
For example, a value of 0.3
means that only 30% of the emitted metrics will be sent.
Defaults to 1.0
(100%).
periodic_secs: u64
Interval for periodic metrics emitted from Relay.
Setting it to 0
seconds disables the periodic metrics.
Defaults to 5 seconds.
aggregate: bool
Whether local metric aggregation using statdsproxy should be enabled.
Defaults to true
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Metrics
impl<'de> Deserialize<'de> for Metrics
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more