From 82f35cf23b1c798cf090b02f9b76b2eb46c8be81 Mon Sep 17 00:00:00 2001 From: Fabian Schindler Date: Mon, 3 Aug 2026 14:41:18 +0200 Subject: [PATCH 1/2] chore(conventions): Bump sentry-conventions to include transform status Bump the sentry-conventions submodule to include PR #465 which adds the "transform" deprecation status for gen_ai attributes. Also adds the Transform variant to DeprecationStatus in the build script (producing WriteBehavior::CurrentName) and updates deprecated constant usages for the app vitals attributes that were renamed in the same range. --- CHANGELOG.md | 1 + relay-conventions/build/attributes.rs | 9 +++++- relay-conventions/sentry-conventions | 2 +- relay-event-normalization/src/eap/mobile.rs | 11 ++++--- relay-event-normalization/src/eap/mod.rs | 32 ++++++++++++--------- tests/integration/test_ai.py | 1 - tests/integration/test_spans_standalone.py | 8 +++--- 7 files changed, 39 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ef5c44b94d..9685853d491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ **Features**: +- Bump `sentry-conventions` to include the `"transform"` deprecation status. ([#6281](https://github.com/getsentry/relay/pull/6281)) - Reject spans, logs, trace metrics, replays when they are too old instead of shifting their timestamp. ([#6272](https://github.com/getsentry/relay/pull/6272)) - Extract nvgpu dumps and create GPU events. ([#6242](https://github.com/getsentry/relay/pull/6242)) diff --git a/relay-conventions/build/attributes.rs b/relay-conventions/build/attributes.rs index 34f56e201d5..123fd980e04 100644 --- a/relay-conventions/build/attributes.rs +++ b/relay-conventions/build/attributes.rs @@ -40,6 +40,11 @@ pub enum DeprecationStatus { Backfill, /// Only write the replacement name. Normalize, + /// Dedicated transformation code handles the move-and-reshape. + /// + /// Produces `WriteBehavior::CurrentName` so the generic renaming logic + /// leaves these attributes alone. + Transform, } /// Information about an attribute's deprecation. @@ -123,7 +128,9 @@ fn format_write_behavior(deprecation: Option<&Deprecation>) -> String { DeprecationStatus::Backfill => { format!("WriteBehavior::BothNames({name})") } - DeprecationStatus::Normalize => { + // Transform is treated as Normalize until dedicated transformation + // code is added. + DeprecationStatus::Normalize | DeprecationStatus::Transform => { format!("WriteBehavior::NewName({name})") } } diff --git a/relay-conventions/sentry-conventions b/relay-conventions/sentry-conventions index e148509bed5..697cdccfed7 160000 --- a/relay-conventions/sentry-conventions +++ b/relay-conventions/sentry-conventions @@ -1 +1 @@ -Subproject commit e148509bed52d260f9abb75876de963a54f14b30 +Subproject commit 697cdccfed773f79509f9701607c7684ca16d4e2 diff --git a/relay-event-normalization/src/eap/mobile.rs b/relay-event-normalization/src/eap/mobile.rs index c7e95db2989..4de5265df54 100644 --- a/relay-event-normalization/src/eap/mobile.rs +++ b/relay-event-normalization/src/eap/mobile.rs @@ -101,7 +101,10 @@ pub fn normalize_mobile_measurements( .and_then(|v| v.as_f64()) { let frames_frozen_rate = frames_frozen / frames_total; - attributes.insert(FRAMES_FROZEN_RATE.to_owned(), frames_frozen_rate); + attributes.insert( + APP__VITALS__FRAMES__FROZEN__RATE.to_owned(), + frames_frozen_rate, + ); } if let Some(frames_slow) = attributes @@ -109,7 +112,7 @@ pub fn normalize_mobile_measurements( .and_then(|v| v.as_f64()) { let frames_slow_rate = frames_slow / frames_total; - attributes.insert(FRAMES_SLOW_RATE.to_owned(), frames_slow_rate); + attributes.insert(APP__VITALS__FRAMES__SLOW__RATE.to_owned(), frames_slow_rate); } } @@ -117,11 +120,11 @@ pub fn normalize_mobile_measurements( if let Some(span_duration) = span_duration && !span_duration.is_zero() && let Some(stall_total_time_ms) = attributes - .get_value(STALL_TOTAL_TIME) + .get_value(APP__VITALS__STALL__DURATION) .and_then(|v| v.as_f64()) { let stall_percentage = stall_total_time_ms / (span_duration.as_millis() as f64); - attributes.insert(STALL_PERCENTAGE.to_owned(), stall_percentage); + attributes.insert(APP__VITALS__STALL__PERCENTAGE.to_owned(), stall_percentage); } } diff --git a/relay-event-normalization/src/eap/mod.rs b/relay-event-normalization/src/eap/mod.rs index 7f5da87843b..1da8ab8acd2 100644 --- a/relay-event-normalization/src/eap/mod.rs +++ b/relay-event-normalization/src/eap/mod.rs @@ -3099,20 +3099,36 @@ mod tests { normalize_attribute_names(&mut attributes); normalize_mobile_measurements(&mut attributes, Some(Duration::from_secs(5))); - insta::assert_json_snapshot!(SerializableAnnotated(&attributes), @r###" + insta::assert_json_snapshot!(SerializableAnnotated(&attributes), @r#" { "app.vitals.frames.frozen.count": { "type": "integer", "value": 2 }, + "app.vitals.frames.frozen.rate": { + "type": "double", + "value": 0.5 + }, "app.vitals.frames.slow.count": { "type": "integer", "value": 1 }, + "app.vitals.frames.slow.rate": { + "type": "double", + "value": 0.25 + }, "app.vitals.frames.total.count": { "type": "integer", "value": 4 }, + "app.vitals.stall.duration": { + "type": "integer", + "value": 4000 + }, + "app.vitals.stall.percentage": { + "type": "double", + "value": 0.8 + }, "frames.slow": { "type": "integer", "value": 1 @@ -3121,23 +3137,11 @@ mod tests { "type": "integer", "value": 4 }, - "frames_frozen_rate": { - "type": "double", - "value": 0.5 - }, - "frames_slow_rate": { - "type": "double", - "value": 0.25 - }, - "stall_percentage": { - "type": "double", - "value": 0.8 - }, "stall_total_time": { "type": "integer", "value": 4000 } } - "###); + "#); } } diff --git a/tests/integration/test_ai.py b/tests/integration/test_ai.py index 8eaf4b185e2..d35f6ed4c2f 100644 --- a/tests/integration/test_ai.py +++ b/tests/integration/test_ai.py @@ -1323,7 +1323,6 @@ def test_ai_spans_example_transaction( "sentry.segment.id": {"type": "string", "value": "657cf984a6a4e59b"}, "sentry.segment.name": {"type": "string", "value": "main"}, "sentry.source": {"type": "string", "value": "custom"}, - "sentry.span.source": {"type": "string", "value": "custom"}, "sentry.status": {"type": "string", "value": "ok"}, "sentry.trace.status": {"type": "string", "value": "ok"}, "sentry.transaction.op": { diff --git a/tests/integration/test_spans_standalone.py b/tests/integration/test_spans_standalone.py index b1bf37953bd..e77f45465fb 100644 --- a/tests/integration/test_spans_standalone.py +++ b/tests/integration/test_spans_standalone.py @@ -851,13 +851,13 @@ def test_mobile_measurements( "type": "string", "value": time_within_delta(expect_resolution="ns"), }, - "stall_total_time": {"value": 4000.0, "type": "double"}, - "stall_percentage": {"value": 0.8, "type": "double"}, + "app.vitals.stall.duration": {"value": 4000.0, "type": "double"}, + "app.vitals.stall.percentage": {"value": 0.8, "type": "double"}, "app.vitals.frames.slow.count": {"value": 1.0, "type": "double"}, "app.vitals.frames.frozen.count": {"value": 2.0, "type": "double"}, "app.vitals.frames.total.count": {"value": 4.0, "type": "double"}, - "frames_frozen_rate": {"value": 0.5, "type": "double"}, - "frames_slow_rate": {"value": 0.25, "type": "double"}, + "app.vitals.frames.frozen.rate": {"value": 0.5, "type": "double"}, + "app.vitals.frames.slow.rate": {"value": 0.25, "type": "double"}, "app.vitals.start.cold.value": {"value": 0.123, "type": "double"}, "app.vitals.start.value": {"value": 0.123, "type": "double"}, "app.vitals.start.type": {"value": "cold", "type": "string"}, From 28bc54ea7723b493455619892008f23989a2f59f Mon Sep 17 00:00:00 2001 From: Fabian Schindler Date: Mon, 3 Aug 2026 16:06:10 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md Co-authored-by: David Herberth --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9685853d491..0ef5c44b94d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,6 @@ **Features**: -- Bump `sentry-conventions` to include the `"transform"` deprecation status. ([#6281](https://github.com/getsentry/relay/pull/6281)) - Reject spans, logs, trace metrics, replays when they are too old instead of shifting their timestamp. ([#6272](https://github.com/getsentry/relay/pull/6272)) - Extract nvgpu dumps and create GPU events. ([#6242](https://github.com/getsentry/relay/pull/6242))