From cd32375c47e9806a425526decac3a1aaf3a78339 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 6 Dec 2023 17:44:10 -0500 Subject: [PATCH 01/10] feat(spans): Allow ingestion of metrics summary on spans --- .../src/normalize/mod.rs | 3 ++ relay-event-schema/src/protocol/span.rs | 8 ++++ .../src/actors/processor/span/processing.rs | 45 +++++++++++++++---- 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/relay-event-normalization/src/normalize/mod.rs b/relay-event-normalization/src/normalize/mod.rs index b8d648fb8ec..1fb1d4d6a0f 100644 --- a/relay-event-normalization/src/normalize/mod.rs +++ b/relay-event-normalization/src/normalize/mod.rs @@ -2265,6 +2265,7 @@ mod tests { sentry_tags: ~, received: ~, measurements: ~, + _metrics_summary: ~, other: {}, }, ] @@ -2307,6 +2308,7 @@ mod tests { sentry_tags: ~, received: ~, measurements: ~, + _metrics_summary: ~, other: {}, }, ] @@ -2349,6 +2351,7 @@ mod tests { sentry_tags: ~, received: ~, measurements: ~, + _metrics_summary: ~, other: {}, }, ] diff --git a/relay-event-schema/src/protocol/span.rs b/relay-event-schema/src/protocol/span.rs index 3b68adceb9d..1c454ef561c 100644 --- a/relay-event-schema/src/protocol/span.rs +++ b/relay-event-schema/src/protocol/span.rs @@ -81,6 +81,13 @@ pub struct Span { #[metastructure(omit_from_schema)] // we only document error events for now pub measurements: Annotated, + /// Temporary protocol support for metric summaries. + /// + /// This shall move to a stable location once we have stabilized the + /// interface. This is intentionally not typed today. + #[metastructure(skip_serialization = "empty")] + pub _metrics_summary: Annotated, + // TODO remove retain when the api stabilizes /// Additional arbitrary fields for forwards compatibility. #[metastructure(additional_properties, retain = "true", pii = "maybe")] @@ -95,6 +102,7 @@ impl From<&Event> for Span { received: event.received.clone(), start_timestamp: event.start_timestamp.clone(), timestamp: event.timestamp.clone(), + _metrics_summary: event._metrics_summary.clone(), ..Default::default() }; diff --git a/relay-server/src/actors/processor/span/processing.rs b/relay-server/src/actors/processor/span/processing.rs index 23e8c81410f..aa6c5060370 100644 --- a/relay-server/src/actors/processor/span/processing.rs +++ b/relay-server/src/actors/processor/span/processing.rs @@ -122,14 +122,6 @@ pub fn extract_from_event(state: &mut ProcessEnvelopeState) { return; }; - // Check feature flag. - if !state - .project_state - .has_feature(Feature::SpanMetricsExtraction) - { - return; - }; - let mut add_span = |span: Annotated| { let span = match validate(span) { Ok(span) => span, @@ -150,6 +142,43 @@ pub fn extract_from_event(state: &mut ProcessEnvelopeState) { state.managed_envelope.envelope_mut().add_item(item); }; + // Check feature flag. + if !state + .project_state + .has_feature(Feature::SpanMetricsExtraction) + { + // When span metrics extraction is disabled, we need to check if DDM is enabled + // to still index spans with _metrics_summary + if !state.project_state.has_feature(Feature::CustomMetrics) { + return; + } + + let Some(event) = state.event.value() else { + return; + }; + + // Extract transaction as a span. + let mut transaction_span: Span = event.into(); + + // Metrics summary is empty so we don't need to ingest the span. + if transaction_span._metrics_summary.is_empty() { + return; + } + + // Extract tags to add to this span as well + let shared_tags = tag_extraction::extract_shared_tags(event); + transaction_span.sentry_tags = Annotated::new( + shared_tags + .clone() + .into_iter() + .map(|(k, v)| (k.sentry_tag_key().to_owned(), Annotated::new(v))) + .collect(), + ); + add_span(transaction_span.into()); + + return; + }; + let Some(event) = state.event.value() else { return; }; From 14055e810668c4f8b53815c21d913abfdb029716 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 6 Dec 2023 18:03:01 -0500 Subject: [PATCH 02/10] Add a CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 002ad8e293a..ded1a3940f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Temporarily add metric summaries on spans and top-level transaction events to link DDM with performance monitoring. ([#2757](https://github.com/getsentry/relay/pull/2757)) - Add size limits on metric related envelope items. ([#2800](https://github.com/getsentry/relay/pull/2800)) - Include the size offending item in the size limit error message. ([#2801](https://github.com/getsentry/relay/pull/2801)) +- Allow ingestion of metrics summary on spans. ([#2823](https://github.com/getsentry/relay/pull/2823)) ## 23.11.2 From 45d3ac7d1853cd2904224090270b0d33333ac24c Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 6 Dec 2023 18:03:31 -0500 Subject: [PATCH 03/10] Check if _metrics_summary is empty on the event itself --- relay-server/src/actors/processor/span/processing.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/relay-server/src/actors/processor/span/processing.rs b/relay-server/src/actors/processor/span/processing.rs index aa6c5060370..2efaff82631 100644 --- a/relay-server/src/actors/processor/span/processing.rs +++ b/relay-server/src/actors/processor/span/processing.rs @@ -157,14 +157,14 @@ pub fn extract_from_event(state: &mut ProcessEnvelopeState) { return; }; - // Extract transaction as a span. - let mut transaction_span: Span = event.into(); - // Metrics summary is empty so we don't need to ingest the span. - if transaction_span._metrics_summary.is_empty() { + if event._metrics_summary.is_empty() { return; } + // Extract transaction as a span. + let mut transaction_span: Span = event.into(); + // Extract tags to add to this span as well let shared_tags = tag_extraction::extract_shared_tags(event); transaction_span.sentry_tags = Annotated::new( From aa572a680097484ef50216a27bd3dc80cc5c79ff Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 6 Dec 2023 18:23:26 -0500 Subject: [PATCH 04/10] Fix tests --- relay-event-schema/src/protocol/span.rs | 1 + ...cs_extraction__event__tests__extract_span_metrics_mobile.snap | 1 + relay-server/src/metrics_extraction/transactions/mod.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/relay-event-schema/src/protocol/span.rs b/relay-event-schema/src/protocol/span.rs index 1c454ef561c..a836cd3464a 100644 --- a/relay-event-schema/src/protocol/span.rs +++ b/relay-event-schema/src/protocol/span.rs @@ -288,6 +288,7 @@ mod tests { sentry_tags: ~, received: ~, measurements: ~, + _metrics_summary: ~, other: {}, } "###); diff --git a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap index ebe70eb5fd8..1fa8adcaf85 100644 --- a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap +++ b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap @@ -38,6 +38,7 @@ expression: "(&event.value().unwrap().spans, metrics)" }, received: ~, measurements: ~, + _metrics_summary: ~, other: {}, }, ], diff --git a/relay-server/src/metrics_extraction/transactions/mod.rs b/relay-server/src/metrics_extraction/transactions/mod.rs index 3f1d846555c..eb9ee94eac7 100644 --- a/relay-server/src/metrics_extraction/transactions/mod.rs +++ b/relay-server/src/metrics_extraction/transactions/mod.rs @@ -573,6 +573,7 @@ mod tests { sentry_tags: ~, received: ~, measurements: ~, + _metrics_summary: ~, other: {}, }, ] From c2968476e3d1a24614d81ade66e73087c3c9f316 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Fri, 8 Dec 2023 09:57:27 -0500 Subject: [PATCH 05/10] Refactor to avoid copying code --- .../src/actors/processor/span/processing.rs | 110 +++++++----------- 1 file changed, 43 insertions(+), 67 deletions(-) diff --git a/relay-server/src/actors/processor/span/processing.rs b/relay-server/src/actors/processor/span/processing.rs index 2efaff82631..bfb93499ae0 100644 --- a/relay-server/src/actors/processor/span/processing.rs +++ b/relay-server/src/actors/processor/span/processing.rs @@ -142,29 +142,54 @@ pub fn extract_from_event(state: &mut ProcessEnvelopeState) { state.managed_envelope.envelope_mut().add_item(item); }; - // Check feature flag. - if !state + let span_metrics_extraction_enabled = state .project_state - .has_feature(Feature::SpanMetricsExtraction) - { - // When span metrics extraction is disabled, we need to check if DDM is enabled - // to still index spans with _metrics_summary - if !state.project_state.has_feature(Feature::CustomMetrics) { - return; - } + .has_feature(Feature::SpanMetricsExtraction); + let custom_metrics_enabled = state.project_state.has_feature(Feature::CustomMetrics); - let Some(event) = state.event.value() else { - return; - }; + let Some(event) = state.event.value() else { + return; + }; - // Metrics summary is empty so we don't need to ingest the span. - if event._metrics_summary.is_empty() { - return; - } + let extract_transaction_span = span_metrics_extraction_enabled + || (custom_metrics_enabled && !event._metrics_summary.is_empty()); + let extract_child_spans = span_metrics_extraction_enabled; + + // Extract transaction as a span. + let mut transaction_span: Span = event.into(); - // Extract transaction as a span. - let mut transaction_span: Span = event.into(); + if extract_child_spans { + let all_modules_enabled = state + .project_state + .has_feature(Feature::SpanMetricsExtractionAllModules); + + // Add child spans as envelope items. + if let Some(child_spans) = event.spans.value() { + for span in child_spans { + let Some(inner_span) = span.value() else { + continue; + }; + // HACK: filter spans based on module until we figure out grouping. + if !all_modules_enabled && !is_allowed(inner_span) { + continue; + } + // HACK: clone the span to set the segment_id. This should happen + // as part of normalization once standalone spans reach wider adoption. + let mut new_span = inner_span.clone(); + new_span.is_segment = Annotated::new(false); + new_span.received = transaction_span.received.clone(); + new_span.segment_id = transaction_span.segment_id.clone(); + + // If a profile is associated with the transaction, also associate it with its + // child spans. + new_span.profile_id = transaction_span.profile_id.clone(); + + add_span(Annotated::new(new_span)); + } + } + } + if extract_transaction_span { // Extract tags to add to this span as well let shared_tags = tag_extraction::extract_shared_tags(event); transaction_span.sentry_tags = Annotated::new( @@ -175,56 +200,7 @@ pub fn extract_from_event(state: &mut ProcessEnvelopeState) { .collect(), ); add_span(transaction_span.into()); - - return; - }; - - let Some(event) = state.event.value() else { - return; - }; - - // Extract transaction as a span. - let mut transaction_span: Span = event.into(); - - let all_modules_enabled = state - .project_state - .has_feature(Feature::SpanMetricsExtractionAllModules); - - // Add child spans as envelope items. - if let Some(child_spans) = event.spans.value() { - for span in child_spans { - let Some(inner_span) = span.value() else { - continue; - }; - // HACK: filter spans based on module until we figure out grouping. - if !all_modules_enabled && !is_allowed(inner_span) { - continue; - } - // HACK: clone the span to set the segment_id. This should happen - // as part of normalization once standalone spans reach wider adoption. - let mut new_span = inner_span.clone(); - new_span.is_segment = Annotated::new(false); - new_span.received = transaction_span.received.clone(); - new_span.segment_id = transaction_span.segment_id.clone(); - - // If a profile is associated with the transaction, also associate it with its - // child spans. - new_span.profile_id = transaction_span.profile_id.clone(); - - add_span(Annotated::new(new_span)); - } } - - // Extract tags to add to this span as well - let shared_tags = tag_extraction::extract_shared_tags(event); - transaction_span.sentry_tags = Annotated::new( - shared_tags - .clone() - .into_iter() - .map(|(k, v)| (k.sentry_tag_key().to_owned(), Annotated::new(v))) - .collect(), - ); - add_span(transaction_span.into()); } /// Config needed to normalize a standalone span. From ec41cd1451a349c71cdf536a82f5dfe7e2f15555 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Fri, 8 Dec 2023 11:32:59 -0500 Subject: [PATCH 06/10] Fix snapshot --- ...cs_extraction__event__tests__extract_span_metrics_mobile.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap index ce7679e9922..52487507a36 100644 --- a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap +++ b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap @@ -40,6 +40,7 @@ expression: "(&event.value().unwrap().spans, metrics)" }, received: ~, measurements: ~, + _metrics_summary: ~, other: {}, }, Span { From 6e14bc7fae1984f84ff50d217925c66a2e86a6da Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Mon, 11 Dec 2023 06:20:53 -0800 Subject: [PATCH 07/10] Add a _metrics_summary field to the test input --- relay-event-schema/src/protocol/span.rs | 45 ++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/relay-event-schema/src/protocol/span.rs b/relay-event-schema/src/protocol/span.rs index a836cd3464a..840ce350d6a 100644 --- a/relay-event-schema/src/protocol/span.rs +++ b/relay-event-schema/src/protocol/span.rs @@ -253,6 +253,19 @@ mod tests { "span_id": "FA90FDEAD5F74052", "type": "trace" } + }, + "_metrics_summary": { + "some_metric": [ + { + "min": 1.0, + "max": 2.0, + "sum": 3.0, + "count": 2, + "tags": { + "environment": "test" + } + } + ] } }"#, ) @@ -288,7 +301,37 @@ mod tests { sentry_tags: ~, received: ~, measurements: ~, - _metrics_summary: ~, + _metrics_summary: Object( + { + "some_metric": Array( + [ + Object( + { + "count": I64( + 2, + ), + "max": F64( + 2.0, + ), + "min": F64( + 1.0, + ), + "sum": F64( + 3.0, + ), + "tags": Object( + { + "environment": String( + "test", + ), + }, + ), + }, + ), + ], + ), + }, + ), other: {}, } "###); From 3f3ca2eead4d435ff072392533114fa748cce68e Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Mon, 11 Dec 2023 11:15:33 -0800 Subject: [PATCH 08/10] Add a test to make sure transaction spans are ingested with DDM --- relay-event-schema/src/protocol/span.rs | 8 +-- .../src/actors/processor/span/processing.rs | 8 ++- tests/integration/test_store.py | 63 +++++++++++++++++++ 3 files changed, 73 insertions(+), 6 deletions(-) diff --git a/relay-event-schema/src/protocol/span.rs b/relay-event-schema/src/protocol/span.rs index 840ce350d6a..625ac5d4b70 100644 --- a/relay-event-schema/src/protocol/span.rs +++ b/relay-event-schema/src/protocol/span.rs @@ -94,8 +94,8 @@ pub struct Span { pub other: Object, } -impl From<&Event> for Span { - fn from(event: &Event) -> Self { +impl From<&mut Event> for Span { + fn from(event: &mut Event) -> Self { let mut span = Self { description: event.transaction.clone(), is_segment: Some(true).into(), @@ -244,7 +244,7 @@ mod tests { #[test] fn span_from_event() { - let event = Annotated::::from_json( + let mut event = Annotated::::from_json( r#"{ "contexts": { "profile": {"profile_id": "a0aaaaaaaaaaaaaaaaaaaaaaaaaaaaab"}, @@ -273,7 +273,7 @@ mod tests { .into_value() .unwrap(); - assert_debug_snapshot!(Span::from(&event), @r###" + assert_debug_snapshot!(Span::from(&mut event), @r###" Span { timestamp: ~, start_timestamp: ~, diff --git a/relay-server/src/actors/processor/span/processing.rs b/relay-server/src/actors/processor/span/processing.rs index bfb93499ae0..7b8890914b1 100644 --- a/relay-server/src/actors/processor/span/processing.rs +++ b/relay-server/src/actors/processor/span/processing.rs @@ -1,5 +1,6 @@ //! Contains the processing-only functionality. +use std::collections::BTreeSet; use std::error::Error; use std::sync::Arc; @@ -7,9 +8,10 @@ use chrono::{DateTime, Utc}; use relay_base_schema::events::EventType; use relay_config::Config; use relay_dynamic_config::{ErrorBoundary, Feature, ProjectConfig}; +use relay_event_normalization::span::attributes; use relay_event_normalization::span::tag_extraction; use relay_event_schema::processor::{process_value, ProcessingState}; -use relay_event_schema::protocol::Span; +use relay_event_schema::protocol::{Span, SpanAttribute}; use relay_metrics::{aggregator::AggregatorConfig, MetricNamespace, UnixTimestamp}; use relay_pii::PiiProcessor; use relay_protocol::{Annotated, Empty}; @@ -147,10 +149,12 @@ pub fn extract_from_event(state: &mut ProcessEnvelopeState) { .has_feature(Feature::SpanMetricsExtraction); let custom_metrics_enabled = state.project_state.has_feature(Feature::CustomMetrics); - let Some(event) = state.event.value() else { + let Some(event) = state.event.value_mut() else { return; }; + attributes::normalize_spans(event, &BTreeSet::from([SpanAttribute::ExclusiveTime])); + let extract_transaction_span = span_metrics_extraction_enabled || (custom_metrics_enabled && !event._metrics_summary.is_empty()); let extract_child_spans = span_metrics_extraction_enabled; diff --git a/tests/integration/test_store.py b/tests/integration/test_store.py index 85fe066189a..121dd4fbde7 100644 --- a/tests/integration/test_store.py +++ b/tests/integration/test_store.py @@ -1580,3 +1580,66 @@ def test_span_ingestion( "retention_days": 90, }, ] + + +def test_span_extraction_with_ddm( + mini_sentry, + relay_with_processing, + spans_consumer, +): + spans_consumer = spans_consumer() + + relay = relay_with_processing() + project_id = 42 + project_config = mini_sentry.add_full_project_config(project_id) + project_config["config"]["features"] = [ + "organizations:custom-metrics", + ] + + event = make_transaction({"event_id": "cbf6960622e14a45abc1f03b2055b186"}) + metrics_summary = { + "c:spans/some_metric@none": [ + { + "min": 1.0, + "max": 2.0, + "sum": 3.0, + "count": 4, + "tags": { + "environment": "test", + }, + }, + ], + } + event["_metrics_summary"] = metrics_summary + + relay.send_event(project_id, event) + + transaction_span = spans_consumer.get_span() + del transaction_span["start_time"] + del transaction_span["span"]["received"] + assert transaction_span == { + "event_id": "cbf6960622e14a45abc1f03b2055b186", + "project_id": 42, + "organization_id": 1, + "retention_days": 90, + "span": { + "description": "hi", + "exclusive_time": 2000.0, + "is_segment": True, + "op": "hi", + "segment_id": "968cff94913ebb07", + "sentry_tags": {"transaction": "hi", "transaction.op": "hi"}, + "span_id": "968cff94913ebb07", + "start_timestamp": datetime.fromisoformat(event["start_timestamp"]) + .replace(tzinfo=timezone.utc) + .timestamp(), + "status": "unknown", + "timestamp": datetime.fromisoformat(event["timestamp"]) + .replace(tzinfo=timezone.utc) + .timestamp(), + "trace_id": "a0fa8803753e40fd8124b21eeb2986b5", + "_metrics_summary": metrics_summary, + }, + } + + spans_consumer.assert_empty() From 9d11ebd767a502024ab0be3c1d88937453d48d5a Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Tue, 12 Dec 2023 10:32:16 +0100 Subject: [PATCH 09/10] test: Enable span attributes --- relay-event-schema/src/protocol/span.rs | 8 ++++---- relay-server/src/actors/processor/span/processing.rs | 4 +--- tests/integration/test_store.py | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/relay-event-schema/src/protocol/span.rs b/relay-event-schema/src/protocol/span.rs index 625ac5d4b70..840ce350d6a 100644 --- a/relay-event-schema/src/protocol/span.rs +++ b/relay-event-schema/src/protocol/span.rs @@ -94,8 +94,8 @@ pub struct Span { pub other: Object, } -impl From<&mut Event> for Span { - fn from(event: &mut Event) -> Self { +impl From<&Event> for Span { + fn from(event: &Event) -> Self { let mut span = Self { description: event.transaction.clone(), is_segment: Some(true).into(), @@ -244,7 +244,7 @@ mod tests { #[test] fn span_from_event() { - let mut event = Annotated::::from_json( + let event = Annotated::::from_json( r#"{ "contexts": { "profile": {"profile_id": "a0aaaaaaaaaaaaaaaaaaaaaaaaaaaaab"}, @@ -273,7 +273,7 @@ mod tests { .into_value() .unwrap(); - assert_debug_snapshot!(Span::from(&mut event), @r###" + assert_debug_snapshot!(Span::from(&event), @r###" Span { timestamp: ~, start_timestamp: ~, diff --git a/relay-server/src/actors/processor/span/processing.rs b/relay-server/src/actors/processor/span/processing.rs index 7b8890914b1..c67fbfd1f5e 100644 --- a/relay-server/src/actors/processor/span/processing.rs +++ b/relay-server/src/actors/processor/span/processing.rs @@ -149,12 +149,10 @@ pub fn extract_from_event(state: &mut ProcessEnvelopeState) { .has_feature(Feature::SpanMetricsExtraction); let custom_metrics_enabled = state.project_state.has_feature(Feature::CustomMetrics); - let Some(event) = state.event.value_mut() else { + let Some(event) = state.event.value() else { return; }; - attributes::normalize_spans(event, &BTreeSet::from([SpanAttribute::ExclusiveTime])); - let extract_transaction_span = span_metrics_extraction_enabled || (custom_metrics_enabled && !event._metrics_summary.is_empty()); let extract_child_spans = span_metrics_extraction_enabled; diff --git a/tests/integration/test_store.py b/tests/integration/test_store.py index 121dd4fbde7..9ea68309c04 100644 --- a/tests/integration/test_store.py +++ b/tests/integration/test_store.py @@ -1592,6 +1592,7 @@ def test_span_extraction_with_ddm( relay = relay_with_processing() project_id = 42 project_config = mini_sentry.add_full_project_config(project_id) + project_config["config"]["spanAttributes"] = ["exclusive-time"] project_config["config"]["features"] = [ "organizations:custom-metrics", ] From a078f20f6d36436b2feb9bb89f7076bd1ffb61c2 Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Tue, 12 Dec 2023 13:45:24 +0100 Subject: [PATCH 10/10] lint --- relay-server/src/actors/processor/span/processing.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/relay-server/src/actors/processor/span/processing.rs b/relay-server/src/actors/processor/span/processing.rs index c67fbfd1f5e..bfb93499ae0 100644 --- a/relay-server/src/actors/processor/span/processing.rs +++ b/relay-server/src/actors/processor/span/processing.rs @@ -1,6 +1,5 @@ //! Contains the processing-only functionality. -use std::collections::BTreeSet; use std::error::Error; use std::sync::Arc; @@ -8,10 +7,9 @@ use chrono::{DateTime, Utc}; use relay_base_schema::events::EventType; use relay_config::Config; use relay_dynamic_config::{ErrorBoundary, Feature, ProjectConfig}; -use relay_event_normalization::span::attributes; use relay_event_normalization::span::tag_extraction; use relay_event_schema::processor::{process_value, ProcessingState}; -use relay_event_schema::protocol::{Span, SpanAttribute}; +use relay_event_schema::protocol::Span; use relay_metrics::{aggregator::AggregatorConfig, MetricNamespace, UnixTimestamp}; use relay_pii::PiiProcessor; use relay_protocol::{Annotated, Empty};