diff --git a/CHANGELOG.md b/CHANGELOG.md index 344b1341321..6c183ce93ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +**Features**: + +- No longer write the deprecated `sentry.transaction` attribute. ([#6237](https://github.com/getsentry/relay/pull/6237)) + ## 26.7.0 **Features**: diff --git a/relay-event-normalization/src/eap/mod.rs b/relay-event-normalization/src/eap/mod.rs index 363b0c17a3b..50f4d4bcf26 100644 --- a/relay-event-normalization/src/eap/mod.rs +++ b/relay-event-normalization/src/eap/mod.rs @@ -968,8 +968,6 @@ pub fn write_legacy_attributes(attributes: &mut Annotated) { (SERVER__ADDRESS, SENTRY__DOMAIN), (HTTP__REQUEST__METHOD, SENTRY__ACTION), (HTTP__RESPONSE__STATUS_CODE, SENTRY__STATUS_CODE), - // Transaction - (SENTRY__SEGMENT__NAME, SENTRY__TRANSACTION), ]; for (current_attribute, legacy_attribute) in current_to_legacy_attributes { diff --git a/relay-event-normalization/src/normalize/span/tag_extraction.rs b/relay-event-normalization/src/normalize/span/tag_extraction.rs index 6945261e2ef..e46346c00cd 100644 --- a/relay-event-normalization/src/normalize/span/tag_extraction.rs +++ b/relay-event-normalization/src/normalize/span/tag_extraction.rs @@ -197,7 +197,6 @@ struct SharedTags { trace_status: Annotated, transaction_method: Annotated, transaction_op: Annotated, - transaction: Annotated, user_city: Annotated, user_country_code: Annotated, user_email: Annotated, @@ -229,7 +228,6 @@ impl SharedTags { trace_status, transaction_method, transaction_op, - transaction, user_city, user_country_code, user_email, @@ -289,9 +287,6 @@ impl SharedTags { if tags.transaction_op.value().is_none() { tags.transaction_op = transaction_op.clone(); }; - if tags.transaction.value().is_none() { - tags.transaction = transaction.clone(); - }; if tags.user_city.value().is_none() { tags.user_city = user_city.clone(); } @@ -378,8 +373,6 @@ fn extract_shared_tags(event: &Event) -> SharedTags { } if let Some(transaction_name) = event.transaction.value() { - tags.transaction = transaction_name.clone().into(); - let transaction_method_from_request = event .request .value() @@ -1057,13 +1050,6 @@ pub fn extract_tags( && ((span_op.starts_with("ui.interaction.") && measurements.contains_key("inp")) || span_op.starts_with("ui.webvital.")) { - if let Some(transaction) = span - .data - .value() - .and_then(|data| data.get_str(SENTRY__SEGMENT__NAME)) - { - span_tags.transaction = transaction.to_owned().into(); - } if let Some(user) = span.data.value().and_then(|data| data.get_str("user")) { span_tags.user = user.to_owned().into(); } diff --git a/relay-event-schema/src/protocol/span.rs b/relay-event-schema/src/protocol/span.rs index 0eb23bad490..51803d0c9fc 100644 --- a/relay-event-schema/src/protocol/span.rs +++ b/relay-event-schema/src/protocol/span.rs @@ -215,7 +215,6 @@ pub struct SentryTags { #[metastructure(pii = "true", field = "user.email")] pub user_email: Annotated, pub environment: Annotated, - pub transaction: Annotated, #[metastructure(field = "transaction.method")] pub transaction_method: Annotated, #[metastructure(field = "transaction.op")] @@ -424,7 +423,6 @@ impl Getter for SentryTags { "trace.status" => &self.trace_status, "transaction.method" => &self.transaction_method, "transaction.op" => &self.transaction_op, - "transaction" => &self.transaction, "ttfd" => &self.ttfd, "ttid" => &self.ttid, "user.email" => &self.user_email, diff --git a/tests/integration/test_ai.py b/tests/integration/test_ai.py index b90b9636cc2..f01096fbaaf 100644 --- a/tests/integration/test_ai.py +++ b/tests/integration/test_ai.py @@ -432,7 +432,6 @@ def test_ai_spans_example_transaction( "sentry.segment.name": {"type": "string", "value": "main"}, "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -557,7 +556,6 @@ def test_ai_spans_example_transaction( "sentry.segment.name": {"type": "string", "value": "main"}, "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -670,7 +668,6 @@ def test_ai_spans_example_transaction( "sentry.status": {"type": "string", "value": "ok"}, "sentry.status_code": {"type": "string", "value": "200"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -762,7 +759,6 @@ def test_ai_spans_example_transaction( "sentry.segment.name": {"type": "string", "value": "main"}, "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -838,7 +834,6 @@ def test_ai_spans_example_transaction( "sentry.status": {"type": "string", "value": "ok"}, "sentry.status_code": {"type": "string", "value": "200"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -923,7 +918,6 @@ def test_ai_spans_example_transaction( "sentry.segment.name": {"type": "string", "value": "main"}, "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -999,7 +993,6 @@ def test_ai_spans_example_transaction( "sentry.status": {"type": "string", "value": "ok"}, "sentry.status_code": {"type": "string", "value": "200"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -1115,7 +1108,6 @@ def test_ai_spans_example_transaction( "sentry.segment.name": {"type": "string", "value": "main"}, "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -1225,7 +1217,6 @@ def test_ai_spans_example_transaction( "sentry.status": {"type": "string", "value": "ok"}, "sentry.status_code": {"type": "string", "value": "200"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", @@ -1299,7 +1290,6 @@ def test_ai_spans_example_transaction( "sentry.span.source": {"type": "string", "value": "custom"}, "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "main"}, "sentry.transaction.op": { "type": "string", "value": "gen_ai.invoke_agent", diff --git a/tests/integration/test_spans.py b/tests/integration/test_spans.py index 41dab0dadde..b377f85b293 100644 --- a/tests/integration/test_spans.py +++ b/tests/integration/test_spans.py @@ -152,7 +152,6 @@ def test_span_extraction( "sentry.status": {"type": "string", "value": "ok"}, "sentry.segment.name": {"type": "string", "value": "hi"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "hi"}, "sentry.transaction.op": {"type": "string", "value": "hi"}, "sentry.user": {"type": "string", "value": f"id:{user_id}"}, "sentry.user.geo.city": {"type": "string", "value": "Vienna"}, @@ -245,7 +244,6 @@ def test_span_extraction( "sentry.status": {"type": "string", "value": "ok"}, "sentry.segment.name": {"type": "string", "value": "hi"}, "sentry.trace.status": {"type": "string", "value": "ok"}, - "sentry.transaction": {"type": "string", "value": "hi"}, "sentry.transaction.op": {"type": "string", "value": "hi"}, "sentry.user": {"type": "string", "value": f"id:{user_id}"}, "sentry.user.geo.city": {"type": "string", "value": "Vienna"}, @@ -336,7 +334,6 @@ def test_span_extraction( "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, "sentry.transaction.op": {"type": "string", "value": "hi"}, - "sentry.transaction": {"type": "string", "value": "hi"}, "sentry.user": {"type": "string", "value": f"id:{user_id}"}, "sentry.user.geo.city": {"type": "string", "value": "Vienna"}, "sentry.user.geo.country_code": {"type": "string", "value": "AT"}, diff --git a/tests/integration/test_spans_standalone.py b/tests/integration/test_spans_standalone.py index b39cd3f9d97..e18466809ea 100644 --- a/tests/integration/test_spans_standalone.py +++ b/tests/integration/test_spans_standalone.py @@ -249,7 +249,6 @@ def test_lcp_span( "replay_id": None, "sentry.report_event": {"type": "string", "value": "navigation"}, "sentry.segment.name": {"type": "string", "value": "/insights/projects/*"}, - "sentry.transaction": {"type": "string", "value": "/insights/projects/*"}, "transaction": None, "user_agent.original": { "type": "string", @@ -464,7 +463,6 @@ def test_cls_span( "replay_id": None, "sentry.report_event": {"type": "string", "value": "navigation"}, "sentry.segment.name": {"type": "string", "value": "/insights/projects/*"}, - "sentry.transaction": {"type": "string", "value": "/insights/projects/*"}, "transaction": None, "user_agent.original": { "type": "string", @@ -653,7 +651,6 @@ def test_inp_span( }, "replay_id": None, "sentry.segment.name": {"type": "string", "value": "/insights/projects/*"}, - "sentry.transaction": {"type": "string", "value": "/insights/projects/*"}, "transaction": None, "user_agent.original": { "type": "string", @@ -1019,7 +1016,6 @@ def test_ua_ip_inference( "replay_id": None, "sentry.report_event": {"type": "string", "value": "navigation"}, "sentry.segment.name": {"type": "string", "value": "/insights/projects/"}, - "sentry.transaction": {"type": "string", "value": "/insights/projects/"}, "transaction": None, "user_agent.original": { "type": "string", diff --git a/tests/integration/test_spansv2.py b/tests/integration/test_spansv2.py index eee7bd6a9a0..920f7d785c1 100644 --- a/tests/integration/test_spansv2.py +++ b/tests/integration/test_spansv2.py @@ -2019,10 +2019,6 @@ def test_spansv2_lcp_segment(mini_sentry, relay_with_processing, spans_consumer) "type": "string", "value": "a84cb30362883928", }, - "sentry.transaction": { - "type": "string", - "value": "/issues/", - }, "user_agent.original": { "type": "string", "value": "RelayIntegrationTests/1.0.0 Firefox/42.0", diff --git a/tests/integration/test_spansv2_otel.py b/tests/integration/test_spansv2_otel.py index b3516cba0d9..5af0ba0e544 100644 --- a/tests/integration/test_spansv2_otel.py +++ b/tests/integration/test_spansv2_otel.py @@ -270,7 +270,6 @@ def test_span_ingestion( "sentry.relay.pipeline": {"type": "string", "value": "span_v2"}, "sentry.segment.id": {"type": "string", "value": "f0b809703e783d00"}, "sentry.segment.name": {"type": "string", "value": "A Proto Span"}, - "sentry.transaction": {"type": "string", "value": "A Proto Span"}, "sentry.kind": {"type": "string", "value": "server"}, "ui.component_name": {"type": "string", "value": "MyComponent"}, },