Skip to content

Commit 9fb5889

Browse files
committed
Merge branch 'master' into feat/span-rollout-sample-rate
* master: test(spanv2): Slightly increase timeout to reduce flakes (#5100) fix(genai): Use correct pii maybe, not false (#5099) ref(metric-stats): Purges metric stats from the codebase (#5097) ref(ourlogs): Removes support for the envelope otel log item type (#5082)
2 parents ad571ac + 022d4f5 commit 9fb5889

File tree

33 files changed

+46
-1366
lines changed

33 files changed

+46
-1366
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
**Breaking Changes**:
66

7+
- Removes support for the deprecated and early alpha only otel log item type. ([#5082](https://github.com/getsentry/relay/pull/5082))
78
- Only check for local project configs in static mode. ([#5057](https://github.com/getsentry/relay/pull/5057))
89

910
**Features**:
@@ -17,6 +18,7 @@
1718
- Improved PII Scrubbing for attributes / logs ([#5061](https://github.com/getsentry/relay/pull/5061)))
1819
- Introduces a project scope sampling rule type. ([#5077](https://github.com/getsentry/relay/pull/5077)))
1920
- Produce transactions on `transactions` Kafka topic, even if they have attachments. ([#5081](https://github.com/getsentry/relay/pull/5081))
21+
- Removes metric stats from the codebase. ([#5097](https://github.com/getsentry/relay/pull/5097))
2022
- Add option gating Snuba publishing to ingest-replay-events for Replays. ([#5088](https://github.com/getsentry/relay/pull/5088))
2123

2224
## 25.8.0

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

relay-base-schema/src/metrics/mri.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ pub enum MetricNamespace {
114114
Spans,
115115
/// User-defined metrics directly sent by SDKs and applications.
116116
Custom,
117-
/// Metric stats.
118-
///
119-
/// Metrics about metrics.
120-
Stats,
121117
/// An unknown and unsupported metric.
122118
///
123119
/// Metrics that Relay either doesn't know or recognize the namespace of will be dropped before
@@ -132,30 +128,23 @@ pub enum MetricNamespace {
132128

133129
impl MetricNamespace {
134130
/// Returns all namespaces/variants of this enum.
135-
pub fn all() -> [Self; 6] {
131+
pub fn all() -> [Self; 5] {
136132
[
137133
Self::Sessions,
138134
Self::Transactions,
139135
Self::Spans,
140136
Self::Custom,
141-
Self::Stats,
142137
Self::Unsupported,
143138
]
144139
}
145140

146-
/// Returns `true` if metric stats are enabled for this namespace.
147-
pub fn has_metric_stats(&self) -> bool {
148-
matches!(self, Self::Custom)
149-
}
150-
151141
/// Returns the string representation for this metric type.
152142
pub fn as_str(&self) -> &'static str {
153143
match self {
154144
Self::Sessions => "sessions",
155145
Self::Transactions => "transactions",
156146
Self::Spans => "spans",
157147
Self::Custom => "custom",
158-
Self::Stats => "metric_stats",
159148
Self::Unsupported => "unsupported",
160149
}
161150
}
@@ -170,7 +159,6 @@ impl std::str::FromStr for MetricNamespace {
170159
"transactions" => Ok(Self::Transactions),
171160
"spans" => Ok(Self::Spans),
172161
"custom" => Ok(Self::Custom),
173-
"metric_stats" => Ok(Self::Stats),
174162
_ => Ok(Self::Unsupported),
175163
}
176164
}

relay-cogs/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ pub enum AppFeature {
178178
MetricsSessions,
179179
/// Metrics in the custom namespace.
180180
MetricsCustom,
181-
/// Metrics in the `metric_stats` namespace.
182-
MetricsStats,
183181
/// Metrics in the unsupported namespace.
184182
///
185183
/// This is usually not emitted, since metrics in the unsupported
@@ -206,7 +204,6 @@ impl AppFeature {
206204
Self::MetricsSpans => "metrics_spans",
207205
Self::MetricsSessions => "metrics_sessions",
208206
Self::MetricsCustom => "metrics_custom",
209-
Self::MetricsStats => "metrics_metric_stats",
210207
Self::MetricsUnsupported => "metrics_unsupported",
211208
Self::Profiles => "profiles",
212209
}

relay-config/src/config.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -575,23 +575,6 @@ impl Default for Metrics {
575575
}
576576
}
577577

578-
/// Controls processing of Sentry metrics and metric metadata.
579-
#[derive(Serialize, Deserialize, Debug, Default)]
580-
#[serde(default)]
581-
pub struct SentryMetrics {
582-
/// Whether metric stats are collected and emitted.
583-
///
584-
/// Metric stats are always collected and emitted when processing
585-
/// is enabled.
586-
///
587-
/// This option is required for running multiple trusted Relays in a chain
588-
/// and you want the metric stats to be collected and forwarded from
589-
/// the first Relay in the chain.
590-
///
591-
/// Defaults to `false`.
592-
pub metric_stats_enabled: bool,
593-
}
594-
595578
/// Controls various limits
596579
#[derive(Serialize, Deserialize, Debug)]
597580
#[serde(default)]
@@ -1622,8 +1605,6 @@ struct ConfigValues {
16221605
#[serde(default)]
16231606
metrics: Metrics,
16241607
#[serde(default)]
1625-
sentry_metrics: SentryMetrics,
1626-
#[serde(default)]
16271608
sentry: relay_log::SentryConfig,
16281609
#[serde(default)]
16291610
processing: Processing,
@@ -2375,14 +2356,6 @@ impl Config {
23752356
self.values.limits.max_metric_buckets_size.as_bytes()
23762357
}
23772358

2378-
/// Whether metric stats are collected and emitted.
2379-
///
2380-
/// Metric stats are always collected and emitted when processing
2381-
/// is enabled.
2382-
pub fn metric_stats_enabled(&self) -> bool {
2383-
self.values.sentry_metrics.metric_stats_enabled || self.values.processing.enabled
2384-
}
2385-
23862359
/// Returns the maximum payload size for general API requests.
23872360
pub fn max_api_payload_size(&self) -> usize {
23882361
self.values.limits.max_api_payload_size.as_bytes()

relay-dynamic-config/src/global.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,6 @@ pub struct Options {
147147
)]
148148
pub metric_bucket_dist_encodings: BucketEncodings,
149149

150-
/// Rollout rate for metric stats.
151-
///
152-
/// Rate needs to be between `0.0` and `1.0`.
153-
/// If set to `1.0` all organizations will have metric stats enabled.
154-
#[serde(
155-
rename = "relay.metric-stats.rollout-rate",
156-
deserialize_with = "default_on_error",
157-
skip_serializing_if = "is_default"
158-
)]
159-
pub metric_stats_rollout_rate: f32,
160-
161150
/// Overall sampling of span extraction.
162151
///
163152
/// This number represents the fraction of transactions for which
@@ -220,7 +209,6 @@ pub struct BucketEncodings {
220209
spans: BucketEncoding,
221210
profiles: BucketEncoding,
222211
custom: BucketEncoding,
223-
metric_stats: BucketEncoding,
224212
}
225213

226214
impl BucketEncodings {
@@ -230,7 +218,6 @@ impl BucketEncodings {
230218
MetricNamespace::Transactions => self.transactions,
231219
MetricNamespace::Spans => self.spans,
232220
MetricNamespace::Custom => self.custom,
233-
MetricNamespace::Stats => self.metric_stats,
234221
// Always force the legacy encoding for sessions,
235222
// sessions are not part of the generic metrics platform with different
236223
// consumer which are not (yet) updated to support the new data.
@@ -266,7 +253,6 @@ where
266253
spans: encoding,
267254
profiles: encoding,
268255
custom: encoding,
269-
metric_stats: encoding,
270256
})
271257
}
272258

@@ -470,7 +456,6 @@ mod tests {
470456
spans: BucketEncoding::Legacy,
471457
profiles: BucketEncoding::Legacy,
472458
custom: BucketEncoding::Legacy,
473-
metric_stats: BucketEncoding::Legacy,
474459
}
475460
);
476461
assert_eq!(
@@ -480,7 +465,6 @@ mod tests {
480465
spans: BucketEncoding::Zstd,
481466
profiles: BucketEncoding::Zstd,
482467
custom: BucketEncoding::Zstd,
483-
metric_stats: BucketEncoding::Zstd,
484468
}
485469
);
486470
}
@@ -492,7 +476,6 @@ mod tests {
492476
spans: BucketEncoding::Zstd,
493477
profiles: BucketEncoding::Base64,
494478
custom: BucketEncoding::Zstd,
495-
metric_stats: BucketEncoding::Base64,
496479
};
497480
let s = serde_json::to_string(&original).unwrap();
498481
let s = format!(

relay-event-schema/src/protocol/span.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ pub struct SpanData {
625625
pub gen_ai_tool_name: Annotated<Value>,
626626

627627
/// The name of the operation being performed.
628-
#[metastructure(field = "gen_ai.operation.name", pii = "false")]
628+
#[metastructure(field = "gen_ai.operation.name", pii = "maybe")]
629629
pub gen_ai_operation_name: Annotated<String>,
630630

631631
/// The client's browser name.

relay-metrics/src/cogs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ fn to_app_feature(ns: MetricNamespace) -> AppFeature {
4141
MetricNamespace::Transactions => AppFeature::MetricsTransactions,
4242
MetricNamespace::Spans => AppFeature::MetricsSpans,
4343
MetricNamespace::Custom => AppFeature::MetricsCustom,
44-
MetricNamespace::Stats => AppFeature::MetricsStats,
4544
MetricNamespace::Unsupported => AppFeature::MetricsUnsupported,
4645
}
4746
}

relay-metrics/src/utils.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ pub struct ByNamespace<T> {
2323
pub spans: T,
2424
/// Value for the [`MetricNamespace::Custom`] namespace.
2525
pub custom: T,
26-
/// Value for the [`MetricNamespace::Stats`] namespace.
27-
pub stats: T,
2826
/// Value for the [`MetricNamespace::Unsupported`] namespace.
2927
pub unsupported: T,
3028
}
@@ -37,7 +35,6 @@ impl<T> ByNamespace<T> {
3735
MetricNamespace::Transactions => &self.transactions,
3836
MetricNamespace::Spans => &self.spans,
3937
MetricNamespace::Custom => &self.custom,
40-
MetricNamespace::Stats => &self.stats,
4138
MetricNamespace::Unsupported => &self.unsupported,
4239
}
4340
}
@@ -49,23 +46,21 @@ impl<T> ByNamespace<T> {
4946
MetricNamespace::Transactions => &mut self.transactions,
5047
MetricNamespace::Spans => &mut self.spans,
5148
MetricNamespace::Custom => &mut self.custom,
52-
MetricNamespace::Stats => &mut self.stats,
5349
MetricNamespace::Unsupported => &mut self.unsupported,
5450
}
5551
}
5652
}
5753

5854
impl<T> IntoIterator for ByNamespace<T> {
5955
type Item = (MetricNamespace, T);
60-
type IntoIter = std::array::IntoIter<(MetricNamespace, T), 6>;
56+
type IntoIter = std::array::IntoIter<(MetricNamespace, T), 5>;
6157

6258
fn into_iter(self) -> Self::IntoIter {
6359
let Self {
6460
sessions,
6561
transactions,
6662
spans,
6763
custom,
68-
stats,
6964
unsupported,
7065
} = self;
7166

@@ -74,7 +69,6 @@ impl<T> IntoIterator for ByNamespace<T> {
7469
(MetricNamespace::Transactions, transactions),
7570
(MetricNamespace::Spans, spans),
7671
(MetricNamespace::Custom, custom),
77-
(MetricNamespace::Stats, stats),
7872
(MetricNamespace::Unsupported, unsupported),
7973
]
8074
.into_iter()
@@ -118,15 +112,13 @@ macro_rules! impl_op {
118112
transactions,
119113
spans,
120114
custom,
121-
stats,
122115
unsupported,
123116
} = self;
124117

125118
$op::$opfn(sessions, rhs.sessions);
126119
$op::$opfn(transactions, rhs.transactions);
127120
$op::$opfn(spans, rhs.spans);
128121
$op::$opfn(custom, rhs.custom);
129-
$op::$opfn(stats, rhs.stats);
130122
$op::$opfn(unsupported, rhs.unsupported);
131123
}
132124
}

relay-ourlogs/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ workspace = true
1616
chrono = { workspace = true }
1717
hex = { workspace = true }
1818
once_cell = { workspace = true }
19-
opentelemetry-proto = { workspace = true, features = [
20-
"gen-tonic",
21-
"with-serde",
22-
"logs",
23-
] }
2419
relay-event-schema = { workspace = true }
2520
relay-protocol = { workspace = true }
2621
relay-common = { workspace = true }

0 commit comments

Comments
 (0)