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,
pub allow_high_cardinality_tags: 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
.
Allows emission of metrics with high cardinality tags.
High cardinality tags are dynamic values attached to metrics, such as project IDs. When enabled, these tags will be included in the emitted metrics. When disabled, the tags will be omitted.
Defaults to false
.