Skip to content
Merged
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

**Features**:

- Add configuration to allow high cardinality tags in metrics. ([#4805](https://github.com/getsentry/relay/pull/4805))

**Internal**:

- Produce spans to the items topic. ([#4735](https://github.com/getsentry/relay/pull/4735))
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ smallvec = { version = "1.13.2", features = ["serde"] }
socket2 = "0.5.8"
sqlparser = "0.44.0"
sqlx = { version = "0.8.2", default-features = false }
statsdproxy = { version = "0.3.0", default-features = false }
statsdproxy = { version = "0.4.1", default-features = false }
symbolic-common = { version = "12.12.3", default-features = false }
symbolic-unreal = { version = "12.12.3", default-features = false }
syn = { version = "2.0.90" }
Expand Down
14 changes: 14 additions & 0 deletions relay-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,14 @@ pub struct Metrics {
///
/// Defaults to `true`.
pub aggregate: bool,
/// 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`.
pub allow_high_cardinality_tags: bool,
}

impl Default for Metrics {
Expand All @@ -569,6 +577,7 @@ impl Default for Metrics {
sample_rate: 1.0,
periodic_secs: 5,
aggregate: true,
allow_high_cardinality_tags: false,
}
}
}
Expand Down Expand Up @@ -2123,6 +2132,11 @@ impl Config {
self.values.metrics.aggregate
}

/// Returns whether high cardinality tags should be removed before sending metrics.
pub fn metrics_allow_high_cardinality_tags(&self) -> bool {
self.values.metrics.allow_high_cardinality_tags
}

/// Returns the interval for periodic metrics emitted from Relay.
///
/// `None` if periodic metrics are disabled.
Expand Down
Loading
Loading