Skip to content

Commit a55366d

Browse files
committed
chore(contexts): Remove default-trace-ID option
Shipped this a week ago and have seen no problems. 👍
1 parent 5468f32 commit a55366d

7 files changed

Lines changed: 6 additions & 17 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Bump `sentry-conventions` to 0.6.0-4. ([#5944](https://github.com/getsentry/relay/pull/5944))
2020
- Enable compression for forwarded uploads. ([#5965](https://github.com/getsentry/relay/pull/5965))
2121
- Change the default partitioning for the envelope buffer from semantic to round-robin. ([#5967](https://github.com/getsentry/relay/pull/5967))
22+
- Remove option gating default-trace-ID behavior. ([#5979](https://github.com/getsentry/relay/pull/5979))
2223

2324
## 26.4.2
2425

‎relay-cabi/src/processing.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ pub unsafe extern "C" fn relay_store_normalizer_normalize_event(
274274
span_allowed_hosts: &[], // only supported in relay
275275
span_op_defaults: Default::default(), // only supported in relay
276276
performance_issues_spans: Default::default(),
277-
derive_trace_id: Default::default(),
278277
};
279278
normalize_event(&mut event, &normalization_config);
280279

Submodule sentry-conventions updated 244 files

‎relay-crash/sentry-native‎

Submodule sentry-native updated 637 files

‎relay-dynamic-config/src/feature.rs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ pub enum Feature {
9595
/// Upload non-prosperodmp playstation attachments via the upload endpoint.
9696
#[serde(rename = "projects:relay-playstation-uploads")]
9797
PlaystationUploads,
98-
/// Add a random trace ID to events that lack one.
99-
#[serde(rename = "organizations:relay-default-trace-id")]
100-
AddDefaultTraceID,
10198
/// Enable experimental expansion of the unreal report in the endpoint rather than in the
10299
/// processor. Only enable for organizations with sufficient attachment quota.
103100
#[serde(rename = "organizations:relay-unreal-endpoint-expansion")]

‎relay-event-normalization/src/event.rs‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,6 @@ pub struct NormalizationConfig<'a> {
168168

169169
/// Set a flag to enable performance issue detection on spans.
170170
pub performance_issues_spans: bool,
171-
172-
/// Should add a random trace ID to events that lack one.
173-
pub derive_trace_id: bool,
174171
}
175172

176173
impl Default for NormalizationConfig<'_> {
@@ -205,7 +202,6 @@ impl Default for NormalizationConfig<'_> {
205202
span_allowed_hosts: Default::default(),
206203
span_op_defaults: Default::default(),
207204
performance_issues_spans: Default::default(),
208-
derive_trace_id: Default::default(),
209205
}
210206
}
211207
}
@@ -1360,10 +1356,8 @@ fn normalize_contexts(
13601356
event_id: Uuid,
13611357
config: &NormalizationConfig,
13621358
) {
1363-
if config.derive_trace_id {
1364-
// We will always need a TraceContext.
1365-
let _ = contexts.get_or_insert_with(Contexts::new);
1366-
}
1359+
// We will always need a TraceContext.
1360+
let _ = contexts.get_or_insert_with(Contexts::new);
13671361

13681362
let _ = processor::apply(contexts, |contexts, _meta| {
13691363
// Reprocessing context sent from SDKs must not be accepted, it is a Sentry-internal
@@ -1374,7 +1368,7 @@ fn normalize_contexts(
13741368
// We need a TraceId to ingest the event into EAP.
13751369
// If the event lacks a TraceContext, add a random one.
13761370

1377-
if config.derive_trace_id && !contexts.contains::<TraceContext>() {
1371+
if !contexts.contains::<TraceContext>() {
13781372
contexts.add(TraceContext::random(event_id))
13791373
}
13801374

@@ -4958,7 +4952,6 @@ mod tests {
49584952
&mut Meta::default(),
49594953
&NormalizationConfig {
49604954
performance_score: Some(&performance_score),
4961-
derive_trace_id: true,
49624955
..Default::default()
49634956
},
49644957
);

‎relay-server/src/processing/utils/event.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ pub fn normalize(
301301
performance_issues_spans: ctx
302302
.project_info
303303
.has_feature(Feature::PerformanceIssuesSpans),
304-
derive_trace_id: project_info.has_feature(Feature::AddDefaultTraceID),
305304
};
306305

307306
metric!(timer(RelayTimers::EventProcessingNormalization), {

0 commit comments

Comments
 (0)