From 1d46a72c9423f17be6999f99550f759d54df2358 Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Thu, 14 Mar 2024 12:21:56 -0400 Subject: [PATCH 1/8] feat(spans): Collect exclusive time for all spans --- relay-dynamic-config/src/defaults.rs | 17 + relay-server/src/metrics_extraction/event.rs | 13 +- ...n__event__tests__extract_span_metrics.snap | 992 +++++++++++++++++- ...t__tests__extract_span_metrics_mobile.snap | 112 ++ 4 files changed, 1129 insertions(+), 5 deletions(-) diff --git a/relay-dynamic-config/src/defaults.rs b/relay-dynamic-config/src/defaults.rs index cc2e887aac6..38548ef0ead 100644 --- a/relay-dynamic-config/src/defaults.rs +++ b/relay-dynamic-config/src/defaults.rs @@ -270,6 +270,23 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { .when(is_http.clone()), ], }, + MetricSpec { + category: DataCategory::Span, + mri: "d:spans/exclusive_time@millisecond".into(), + field: Some("span.exclusive_time".into()), + condition: None, + tags: vec![ + Tag::with_key("transaction") + .from_field("span.sentry_tags.transaction") + .always(), + Tag::with_key("environment") + .from_field("span.sentry_tags.environment") + .always(), + Tag::with_key("span.op") + .from_field("span.sentry_tags.op") + .always(), + ], + }, MetricSpec { category: DataCategory::Span, mri: "d:spans/http.response_content_length@byte".into(), diff --git a/relay-server/src/metrics_extraction/event.rs b/relay-server/src/metrics_extraction/event.rs index 3b86f702160..a7c0b2fcb46 100644 --- a/relay-server/src/metrics_extraction/event.rs +++ b/relay-server/src/metrics_extraction/event.rs @@ -1299,6 +1299,7 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", + "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] @@ -1308,7 +1309,7 @@ mod tests { #[test] fn test_app_start_cold_outlier() { let metrics = extract_span_metrics_mobile("app.start.cold", 181000.0); - assert!(metrics.is_empty()); + assert_eq!(metrics.len(), 1); } #[test] @@ -1319,6 +1320,7 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", + "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] @@ -1328,7 +1330,7 @@ mod tests { #[test] fn test_app_start_warm_outlier() { let metrics = extract_span_metrics_mobile("app.start.warm", 181000.0); - assert!(metrics.is_empty()); + assert_eq!(metrics.len(), 1); } #[test] @@ -1339,6 +1341,7 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", + "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] @@ -1348,7 +1351,7 @@ mod tests { #[test] fn test_ui_load_initial_display_outlier() { let metrics = extract_span_metrics_mobile("ui.load.initial_display", 181000.0); - assert!(metrics.is_empty()); + assert_eq!(metrics.len(), 1); } #[test] @@ -1359,6 +1362,7 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", + "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] @@ -1368,7 +1372,7 @@ mod tests { #[test] fn test_ui_load_full_display_outlier() { let metrics = extract_span_metrics_mobile("ui.load.full_display", 181000.0); - assert!(metrics.is_empty()); + assert_eq!(metrics.len(), 1); } #[test] @@ -1403,6 +1407,7 @@ mod tests { } assert_eq!(metric.tag("ttid"), Some("ttid")); assert_eq!(metric.tag("ttfd"), Some("ttfd")); + break; } } diff --git a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap index 6b3ee6cc295..ca2101a91e8 100644 --- a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap +++ b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap @@ -3,6 +3,21 @@ source: relay-server/src/metrics_extraction/event.rs expression: metrics --- [ + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "ui.react.render", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -53,6 +68,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -103,6 +133,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -153,6 +198,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -201,6 +261,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -251,6 +326,21 @@ expression: metrics "span.status_code": "500", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -301,6 +391,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -353,6 +458,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -405,6 +525,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -457,6 +592,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -509,6 +659,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -561,6 +726,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -613,6 +793,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -666,6 +861,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -714,6 +924,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -767,6 +992,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -816,6 +1056,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -871,7 +1126,22 @@ expression: metrics Bucket { timestamp: UnixTimestamp(1597976302), width: 0, - name: "c:spans/count_per_op@none", + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "c:spans/count_per_op@none", value: Counter( 1.0, ), @@ -921,6 +1191,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -970,6 +1255,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1019,6 +1319,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1070,6 +1385,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1083,6 +1413,21 @@ expression: metrics "span.system": "mydatabase", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "cache.get_item", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1095,6 +1440,21 @@ expression: metrics "span.op": "cache.get_item", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.redis", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1107,6 +1467,21 @@ expression: metrics "span.op": "db.redis", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.redis", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1119,6 +1494,21 @@ expression: metrics "span.op": "db.redis", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.redis", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1170,6 +1560,21 @@ expression: metrics "span.op": "resource.script", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "resource.script", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1182,6 +1587,21 @@ expression: metrics "span.op": "resource.script", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1231,6 +1651,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1244,6 +1679,21 @@ expression: metrics "span.system": "mydatabase", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.mongodb.find", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1292,6 +1742,21 @@ expression: metrics "span.op": "db.sql.activerecord", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.activerecord", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1305,6 +1770,21 @@ expression: metrics "span.system": "mydatabase", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.redis.command", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1318,6 +1798,21 @@ expression: metrics "span.system": "redis", }, }, + Bucket { + timestamp: UnixTimestamp(1695255152), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 15833.532095, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "ui.load", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1695255152), width: 0, @@ -1329,6 +1824,21 @@ expression: metrics "span.op": "ui.load", }, }, + Bucket { + timestamp: UnixTimestamp(1695255136), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 1668.516159, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "app.start.cold", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1695255136), width: 0, @@ -1382,6 +1892,21 @@ expression: metrics "span.op": "resource.css", }, }, + Bucket { + timestamp: UnixTimestamp(1694732408), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 477.800131, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "resource.css", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, @@ -1493,6 +2018,21 @@ expression: metrics "span.op": "resource.script", }, }, + Bucket { + timestamp: UnixTimestamp(1694732408), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 477.800131, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "resource.script", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, @@ -1563,6 +2103,21 @@ expression: metrics "span.op": "resource.script", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "ui.react.render", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1613,6 +2168,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1663,6 +2233,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1713,6 +2298,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1761,6 +2361,21 @@ expression: metrics "span.op": "http.client", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1811,6 +2426,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1863,6 +2493,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1915,6 +2560,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1967,6 +2627,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2019,6 +2694,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2071,6 +2761,21 @@ expression: metrics "span.status_code": "200", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "http.client", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2123,6 +2828,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2176,6 +2896,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2224,6 +2959,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2277,6 +3027,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2326,6 +3091,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2378,6 +3158,21 @@ expression: metrics "span.op": "db.sql.query", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.sql.query", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2431,6 +3226,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2480,6 +3290,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2529,6 +3354,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2580,6 +3420,21 @@ expression: metrics "span.op": "db", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2593,6 +3448,21 @@ expression: metrics "span.system": "mydatabase", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "cache.get_item", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2605,6 +3475,21 @@ expression: metrics "span.op": "cache.get_item", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.redis", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2617,6 +3502,21 @@ expression: metrics "span.op": "db.redis", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.redis", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2629,6 +3529,21 @@ expression: metrics "span.op": "db.redis", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "db.redis", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2678,6 +3593,21 @@ expression: metrics "span.op": "resource.script", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "resource.script", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2729,6 +3659,21 @@ expression: metrics "span.op": "resource.script", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "resource.script", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2782,6 +3727,21 @@ expression: metrics "span.op": "resource.css", }, }, + Bucket { + timestamp: UnixTimestamp(1694732408), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 477.800131, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "resource.css", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, @@ -2887,6 +3847,21 @@ expression: metrics "span.op": "resource.script", }, }, + Bucket { + timestamp: UnixTimestamp(1694732408), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 477.800131, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "resource.script", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, @@ -2914,6 +3889,21 @@ expression: metrics "span.op": "ui.interaction.click", }, }, + Bucket { + timestamp: UnixTimestamp(1702474613), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 32.000065, + ], + ), + tags: { + "environment": "fake_environment", + "span.op": "ui.interaction.click", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1702474613), width: 0, 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 e30c2ae81f3..b43a7837d29 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 @@ -458,6 +458,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "app.start.cold", }, }, + Bucket { + timestamp: UnixTimestamp(1597976302), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 2000.0, + ], + ), + tags: { + "span.op": "app.start.cold", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -518,6 +532,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "ui.load.initial_display", }, }, + Bucket { + timestamp: UnixTimestamp(1597976303), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 3000.0, + ], + ), + tags: { + "span.op": "ui.load.initial_display", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -583,6 +611,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "app.start.cold", }, }, + Bucket { + timestamp: UnixTimestamp(1597976303), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 3000.0, + ], + ), + tags: { + "span.op": "app.start.cold", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -627,6 +669,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "transaction": "gEt /api/:version/users/", }, }, + Bucket { + timestamp: UnixTimestamp(1597976303), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 3000.0, + ], + ), + tags: { + "span.op": "custom.op", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -690,6 +746,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "contentprovider.load", }, }, + Bucket { + timestamp: UnixTimestamp(1597976303), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 3000.0, + ], + ), + tags: { + "span.op": "contentprovider.load", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -753,6 +823,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "application.load", }, }, + Bucket { + timestamp: UnixTimestamp(1597976303), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 3000.0, + ], + ), + tags: { + "span.op": "application.load", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -816,6 +900,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "activity.load", }, }, + Bucket { + timestamp: UnixTimestamp(1597976303), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 3000.0, + ], + ), + tags: { + "span.op": "activity.load", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -875,6 +973,20 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "process.load", }, }, + Bucket { + timestamp: UnixTimestamp(1597976303), + width: 0, + name: "d:spans/exclusive_time@millisecond", + value: Distribution( + [ + 3000.0, + ], + ), + tags: { + "span.op": "process.load", + "transaction": "gEt /api/:version/users/", + }, + }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, From f3364139a4adc7f591c65d3397ebed8226e15b26 Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Thu, 14 Mar 2024 14:32:39 -0400 Subject: [PATCH 2/8] Make sure to not extract the metric twice --- relay-dynamic-config/src/defaults.rs | 11 +- relay-server/src/metrics_extraction/event.rs | 4 - ...n__event__tests__extract_span_metrics.snap | 752 +----------------- ...t__tests__extract_span_metrics_mobile.snap | 98 --- 4 files changed, 7 insertions(+), 858 deletions(-) diff --git a/relay-dynamic-config/src/defaults.rs b/relay-dynamic-config/src/defaults.rs index 38548ef0ead..36b52485564 100644 --- a/relay-dynamic-config/src/defaults.rs +++ b/relay-dynamic-config/src/defaults.rs @@ -130,6 +130,10 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { | is_http.clone()) & duration_condition.clone(); + let exclusive_time_condition = + (is_db.clone() | is_resource.clone() | is_mobile.clone() | is_http.clone()) + & duration_condition.clone(); + [ MetricSpec { category: DataCategory::Span, @@ -142,10 +146,7 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { category: DataCategory::Span, mri: "d:spans/exclusive_time@millisecond".into(), field: Some("span.exclusive_time".into()), - condition: Some( - (is_db.clone() | is_resource.clone() | is_mobile.clone() | is_http.clone()) - & duration_condition.clone(), - ), + condition: Some(exclusive_time_condition.clone()), tags: vec![ // Common tags: Tag::with_key("environment") @@ -274,7 +275,7 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { category: DataCategory::Span, mri: "d:spans/exclusive_time@millisecond".into(), field: Some("span.exclusive_time".into()), - condition: None, + condition: Some(!exclusive_time_condition.clone()), tags: vec![ Tag::with_key("transaction") .from_field("span.sentry_tags.transaction") diff --git a/relay-server/src/metrics_extraction/event.rs b/relay-server/src/metrics_extraction/event.rs index a7c0b2fcb46..749c5e3f31a 100644 --- a/relay-server/src/metrics_extraction/event.rs +++ b/relay-server/src/metrics_extraction/event.rs @@ -1299,7 +1299,6 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", - "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] @@ -1320,7 +1319,6 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", - "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] @@ -1341,7 +1339,6 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", - "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] @@ -1362,7 +1359,6 @@ mod tests { vec![ "d:spans/exclusive_time@millisecond", "d:spans/exclusive_time_light@millisecond", - "d:spans/exclusive_time@millisecond", "c:spans/count_per_op@none", "c:spans/count_per_segment@none" ] diff --git a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap index ca2101a91e8..988d0f260f3 100644 --- a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap +++ b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap @@ -68,21 +68,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -133,21 +118,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -198,21 +168,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -261,21 +216,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -326,21 +266,6 @@ expression: metrics "span.status_code": "500", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -391,21 +316,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -458,21 +368,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -525,21 +420,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -592,21 +472,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -659,21 +524,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -726,21 +576,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -793,21 +628,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -861,21 +681,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -924,21 +729,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -992,21 +782,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1056,21 +831,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1123,21 +883,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1191,21 +936,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1255,21 +985,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1319,21 +1034,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1385,21 +1085,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1560,21 +1245,6 @@ expression: metrics "span.op": "resource.script", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "resource.script", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1651,21 +1321,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1742,21 +1397,6 @@ expression: metrics "span.op": "db.sql.activerecord", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.activerecord", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -1892,21 +1532,6 @@ expression: metrics "span.op": "resource.css", }, }, - Bucket { - timestamp: UnixTimestamp(1694732408), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 477.800131, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "resource.css", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, @@ -2018,21 +1643,6 @@ expression: metrics "span.op": "resource.script", }, }, - Bucket { - timestamp: UnixTimestamp(1694732408), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 477.800131, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "resource.script", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, @@ -2168,21 +1778,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2233,21 +1828,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2298,21 +1878,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2361,21 +1926,6 @@ expression: metrics "span.op": "http.client", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2426,21 +1976,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2493,21 +2028,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2557,22 +2077,7 @@ expression: metrics "span.domain": "targetdomain.tld:1234", "span.group": "72ab88b506cb04b2", "span.op": "http.client", - "span.status_code": "200", - }, - }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", + "span.status_code": "200", }, }, Bucket { @@ -2627,21 +2132,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2694,21 +2184,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2761,21 +2236,6 @@ expression: metrics "span.status_code": "200", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "http.client", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2828,21 +2288,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2896,21 +2341,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -2959,21 +2389,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3027,21 +2442,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3091,21 +2491,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3158,21 +2543,6 @@ expression: metrics "span.op": "db.sql.query", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db.sql.query", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3226,21 +2596,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3290,21 +2645,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3354,21 +2694,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3420,21 +2745,6 @@ expression: metrics "span.op": "db", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "db", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3593,21 +2903,6 @@ expression: metrics "span.op": "resource.script", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "resource.script", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3659,21 +2954,6 @@ expression: metrics "span.op": "resource.script", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "resource.script", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -3727,21 +3007,6 @@ expression: metrics "span.op": "resource.css", }, }, - Bucket { - timestamp: UnixTimestamp(1694732408), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 477.800131, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "resource.css", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, @@ -3847,21 +3112,6 @@ expression: metrics "span.op": "resource.script", }, }, - Bucket { - timestamp: UnixTimestamp(1694732408), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 477.800131, - ], - ), - tags: { - "environment": "fake_environment", - "span.op": "resource.script", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1694732408), width: 0, 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 b43a7837d29..3d1279f9c0d 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 @@ -458,20 +458,6 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "app.start.cold", }, }, - Bucket { - timestamp: UnixTimestamp(1597976302), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 2000.0, - ], - ), - tags: { - "span.op": "app.start.cold", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976302), width: 0, @@ -532,20 +518,6 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "ui.load.initial_display", }, }, - Bucket { - timestamp: UnixTimestamp(1597976303), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 3000.0, - ], - ), - tags: { - "span.op": "ui.load.initial_display", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -611,20 +583,6 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "app.start.cold", }, }, - Bucket { - timestamp: UnixTimestamp(1597976303), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 3000.0, - ], - ), - tags: { - "span.op": "app.start.cold", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -746,20 +704,6 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "contentprovider.load", }, }, - Bucket { - timestamp: UnixTimestamp(1597976303), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 3000.0, - ], - ), - tags: { - "span.op": "contentprovider.load", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -823,20 +767,6 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "application.load", }, }, - Bucket { - timestamp: UnixTimestamp(1597976303), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 3000.0, - ], - ), - tags: { - "span.op": "application.load", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -900,20 +830,6 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "activity.load", }, }, - Bucket { - timestamp: UnixTimestamp(1597976303), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 3000.0, - ], - ), - tags: { - "span.op": "activity.load", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, @@ -973,20 +889,6 @@ expression: "(&event.value().unwrap().spans, metrics)" "span.op": "process.load", }, }, - Bucket { - timestamp: UnixTimestamp(1597976303), - width: 0, - name: "d:spans/exclusive_time@millisecond", - value: Distribution( - [ - 3000.0, - ], - ), - tags: { - "span.op": "process.load", - "transaction": "gEt /api/:version/users/", - }, - }, Bucket { timestamp: UnixTimestamp(1597976303), width: 0, From 4decb559c9d1fcafcbd5f60d529b51fb3013c1af Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Thu, 14 Mar 2024 15:09:16 -0400 Subject: [PATCH 3/8] Add a CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2beae000fa8..358d4bcb17a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - Filter null values from metrics summary tags. ([#3204](https://github.com/getsentry/relay/pull/3204)) - Emit a usage metric for every span seen. ([#3209](https://github.com/getsentry/relay/pull/3209)) - Add namespace for profile metrics. ([#3229](https://github.com/getsentry/relay/pull/3229)) +- Collect exclusive time for all spans. ([#3268](https://github.com/getsentry/relay/pull/3268)) ## 24.2.0 From bf9e79d3af414cb141bd6224c254611c68baa345 Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Thu, 14 Mar 2024 19:29:45 -0400 Subject: [PATCH 4/8] Fix integration tests --- tests/integration/test_spans.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/integration/test_spans.py b/tests/integration/test_spans.py index 415ab515c36..398a5ef8532 100644 --- a/tests/integration/test_spans.py +++ b/tests/integration/test_spans.py @@ -528,6 +528,26 @@ def test_span_ingestion( "type": "d", "value": [500.0], }, + { + "name": "d:spans/exclusive_time@millisecond", + "org_id": 1, + "project_id": 42, + "retention_days": 90, + "tags": {"span.op": "default"}, + "timestamp": expected_timestamp, + "type": "d", + "value": [500.0, 500.0], + }, + { + "name": "d:spans/exclusive_time@millisecond", + "org_id": 1, + "project_id": 42, + "retention_days": 90, + "tags": {"span.op": "default"}, + "timestamp": expected_timestamp + 1, + "type": "d", + "value": [345.0, 345.0], + }, { "org_id": 1, "project_id": 42, From ebd0c7bab8a429e3081fa43657ac961be745d7a4 Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Fri, 15 Mar 2024 11:35:44 -0400 Subject: [PATCH 5/8] Use the existing metric definition and tweak conditions instead --- relay-dynamic-config/src/defaults.rs | 43 ++++++------------- ...n__event__tests__extract_span_metrics.snap | 12 +++--- 2 files changed, 18 insertions(+), 37 deletions(-) diff --git a/relay-dynamic-config/src/defaults.rs b/relay-dynamic-config/src/defaults.rs index 36b52485564..0bd0762e5f3 100644 --- a/relay-dynamic-config/src/defaults.rs +++ b/relay-dynamic-config/src/defaults.rs @@ -130,7 +130,7 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { | is_http.clone()) & duration_condition.clone(); - let exclusive_time_condition = + let know_modules_condition = (is_db.clone() | is_resource.clone() | is_mobile.clone() | is_http.clone()) & duration_condition.clone(); @@ -146,14 +146,18 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { category: DataCategory::Span, mri: "d:spans/exclusive_time@millisecond".into(), field: Some("span.exclusive_time".into()), - condition: Some(exclusive_time_condition.clone()), + condition: None, tags: vec![ // Common tags: + Tag::with_key("transaction") + .from_field("span.sentry_tags.transaction") + .always(), Tag::with_key("environment") .from_field("span.sentry_tags.environment") - .when( - is_db.clone() | is_resource.clone() | is_mobile.clone() | is_http.clone(), - ), + .always(), + Tag::with_key("span.op") + .from_field("span.sentry_tags.op") + .always(), Tag::with_key("transaction.method") .from_field("span.sentry_tags.transaction.method") .when(is_db.clone() | is_mobile.clone() | is_http.clone()), // groups by method + txn, e.g. `GET /users` @@ -162,22 +166,16 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { .when(is_db.clone()), Tag::with_key("span.category") .from_field("span.sentry_tags.category") - .always(), + .when(know_modules_condition.clone()), Tag::with_key("span.description") .from_field("span.sentry_tags.description") - .always(), + .when(know_modules_condition.clone()), Tag::with_key("span.domain") .from_field("span.sentry_tags.domain") .when(is_db.clone() | is_resource.clone() | is_http.clone()), Tag::with_key("span.group") .from_field("span.sentry_tags.group") - .always(), - Tag::with_key("span.op") - .from_field("span.sentry_tags.op") - .always(), - Tag::with_key("transaction") - .from_field("span.sentry_tags.transaction") - .always(), + .when(know_modules_condition.clone()), // Mobile: Tag::with_key("transaction.op") .from_field("span.sentry_tags.transaction.op") @@ -271,23 +269,6 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { .when(is_http.clone()), ], }, - MetricSpec { - category: DataCategory::Span, - mri: "d:spans/exclusive_time@millisecond".into(), - field: Some("span.exclusive_time".into()), - condition: Some(!exclusive_time_condition.clone()), - tags: vec![ - Tag::with_key("transaction") - .from_field("span.sentry_tags.transaction") - .always(), - Tag::with_key("environment") - .from_field("span.sentry_tags.environment") - .always(), - Tag::with_key("span.op") - .from_field("span.sentry_tags.op") - .always(), - ], - }, MetricSpec { category: DataCategory::Span, mri: "d:spans/http.response_content_length@byte".into(), diff --git a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap index 57026595de5..2a0f7103e8d 100644 --- a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap +++ b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap @@ -3694,16 +3694,16 @@ expression: metrics Bucket { timestamp: UnixTimestamp(1702474613), width: 0, - name: "d:spans/exclusive_time_light@millisecond", + name: "d:spans/exclusive_time@millisecond", value: Distribution( [ 32.000065, ], ), tags: { - "span.description": "my-component-name", - "span.group": "e674f9eca1d88a4d", + "environment": "fake_environment", "span.op": "ui.interaction.click", + "transaction": "gEt /api/:version/users/", }, metadata: BucketMetadata { merges: 1, @@ -3712,16 +3712,16 @@ expression: metrics Bucket { timestamp: UnixTimestamp(1702474613), width: 0, - name: "d:spans/exclusive_time@millisecond", + name: "d:spans/exclusive_time_light@millisecond", value: Distribution( [ 32.000065, ], ), tags: { - "environment": "fake_environment", + "span.description": "my-component-name", + "span.group": "e674f9eca1d88a4d", "span.op": "ui.interaction.click", - "transaction": "gEt /api/:version/users/", }, metadata: BucketMetadata { merges: 1, From 8048b0c632b99462a7ea191c81de32064c99fa90 Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Fri, 15 Mar 2024 11:48:32 -0400 Subject: [PATCH 6/8] Fix tests --- relay-server/src/metrics_extraction/event.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/relay-server/src/metrics_extraction/event.rs b/relay-server/src/metrics_extraction/event.rs index a91a6f187c2..3668b3db31b 100644 --- a/relay-server/src/metrics_extraction/event.rs +++ b/relay-server/src/metrics_extraction/event.rs @@ -1299,7 +1299,7 @@ mod tests { let metrics = extract_span_metrics_mobile("app.start.cold", 181000.0); assert_eq!( metrics.iter().map(|m| &m.name).collect::<Vec<_>>(), - vec!["c:spans/usage@none"] + vec!["c:spans/usage@none", "d:spans/exclusive_time@millisecond"] ); } @@ -1323,7 +1323,7 @@ mod tests { let metrics = extract_span_metrics_mobile("app.start.warm", 181000.0); assert_eq!( metrics.iter().map(|m| &m.name).collect::<Vec<_>>(), - vec!["c:spans/usage@none"] + vec!["c:spans/usage@none", "d:spans/exclusive_time@millisecond"] ); } @@ -1347,7 +1347,7 @@ mod tests { let metrics = extract_span_metrics_mobile("ui.load.initial_display", 181000.0); assert_eq!( metrics.iter().map(|m| &m.name).collect::<Vec<_>>(), - vec!["c:spans/usage@none"] + vec!["c:spans/usage@none", "d:spans/exclusive_time@millisecond"] ); } @@ -1371,7 +1371,7 @@ mod tests { let metrics = extract_span_metrics_mobile("ui.load.full_display", 181000.0); assert_eq!( metrics.iter().map(|m| &m.name).collect::<Vec<_>>(), - vec!["c:spans/usage@none"] + vec!["c:spans/usage@none", "d:spans/exclusive_time@millisecond"] ); } From 87c8b682be516eca89f971b721fe49ed730743ec Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Mon, 18 Mar 2024 17:54:08 -0400 Subject: [PATCH 7/8] Add transaction.op tag --- relay-dynamic-config/src/defaults.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/relay-dynamic-config/src/defaults.rs b/relay-dynamic-config/src/defaults.rs index 0bd0762e5f3..59ccfdc4616 100644 --- a/relay-dynamic-config/src/defaults.rs +++ b/relay-dynamic-config/src/defaults.rs @@ -148,16 +148,20 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { field: Some("span.exclusive_time".into()), condition: None, tags: vec![ - // Common tags: - Tag::with_key("transaction") - .from_field("span.sentry_tags.transaction") - .always(), + // All modules: Tag::with_key("environment") .from_field("span.sentry_tags.environment") .always(), Tag::with_key("span.op") .from_field("span.sentry_tags.op") .always(), + Tag::with_key("transaction") + .from_field("span.sentry_tags.transaction") + .always(), + Tag::with_key("transaction.op") + .from_field("span.sentry_tags.transaction.op") + .always(), + // Know modules: Tag::with_key("transaction.method") .from_field("span.sentry_tags.transaction.method") .when(is_db.clone() | is_mobile.clone() | is_http.clone()), // groups by method + txn, e.g. `GET /users` @@ -176,10 +180,7 @@ fn span_metrics() -> impl IntoIterator<Item = MetricSpec> { Tag::with_key("span.group") .from_field("span.sentry_tags.group") .when(know_modules_condition.clone()), - // Mobile: - Tag::with_key("transaction.op") - .from_field("span.sentry_tags.transaction.op") - .when(is_mobile.clone()), // filters by `transaction.op:ui.load` + // Mobile module: Tag::with_key("device.class") .from_field("span.sentry_tags.device.class") .when(is_mobile.clone()), From 79cbc4dea6ef2a465bc532069d4f55a4464cbc8a Mon Sep 17 00:00:00 2001 From: Pierre Massat <pierre.massat@sentry.io> Date: Mon, 18 Mar 2024 18:03:25 -0400 Subject: [PATCH 8/8] Update snapshot --- ...n__event__tests__extract_span_metrics.snap | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap index 78173d754ca..a1efac477e8 100644 --- a/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap +++ b/relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics.snap @@ -28,6 +28,7 @@ expression: metrics "environment": "fake_environment", "span.op": "ui.react.render", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -78,6 +79,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -149,6 +151,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -220,6 +223,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -290,6 +294,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -360,6 +365,7 @@ expression: metrics "span.status_code": "500", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -431,6 +437,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -503,6 +510,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -576,6 +584,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -649,6 +658,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -722,6 +732,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -795,6 +806,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -868,6 +880,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -942,6 +955,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1013,6 +1027,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1085,6 +1100,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1157,6 +1173,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1228,6 +1245,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1302,6 +1320,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1374,6 +1393,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1444,6 +1464,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1515,6 +1536,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1582,6 +1604,7 @@ expression: metrics "environment": "fake_environment", "span.op": "cache.get_item", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1627,6 +1650,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.redis", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1672,6 +1696,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.redis", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1717,6 +1742,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.redis", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1767,6 +1793,7 @@ expression: metrics "span.group": "022f81fdf31228bf", "span.op": "resource.script", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1834,6 +1861,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1884,6 +1912,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1950,6 +1979,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.mongodb.find", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -1999,6 +2029,7 @@ expression: metrics "span.op": "db.sql.activerecord", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2065,6 +2096,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.redis.command", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2111,6 +2143,7 @@ expression: metrics "environment": "fake_environment", "span.op": "ui.load", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2155,6 +2188,7 @@ expression: metrics "environment": "fake_environment", "span.op": "app.start.cold", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2206,6 +2240,7 @@ expression: metrics "span.group": "d744fa0716ef1142", "span.op": "resource.css", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2347,6 +2382,7 @@ expression: metrics "span.group": "89bda2e660f6236c", "span.op": "resource.script", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2482,6 +2518,7 @@ expression: metrics "environment": "fake_environment", "span.op": "ui.react.render", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2532,6 +2569,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2603,6 +2641,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2674,6 +2713,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2744,6 +2784,7 @@ expression: metrics "span.op": "http.client", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2814,6 +2855,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2886,6 +2928,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -2959,6 +3002,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3032,6 +3076,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3105,6 +3150,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3178,6 +3224,7 @@ expression: metrics "span.status_code": "200", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3251,6 +3298,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3325,6 +3373,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3396,6 +3445,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3468,6 +3518,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3540,6 +3591,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3611,6 +3663,7 @@ expression: metrics "span.op": "db.sql.query", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3685,6 +3738,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3757,6 +3811,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3827,6 +3882,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3898,6 +3954,7 @@ expression: metrics "span.op": "db", "transaction": "gEt /api/:version/users/", "transaction.method": "POST", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -3965,6 +4022,7 @@ expression: metrics "environment": "fake_environment", "span.op": "cache.get_item", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4010,6 +4068,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.redis", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4055,6 +4114,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.redis", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4100,6 +4160,7 @@ expression: metrics "environment": "fake_environment", "span.op": "db.redis", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4149,6 +4210,7 @@ expression: metrics "span.group": "3e92c536f98104b2", "span.op": "resource.script", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4220,6 +4282,7 @@ expression: metrics "span.group": "022f81fdf31228bf", "span.op": "resource.script", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4293,6 +4356,7 @@ expression: metrics "span.group": "7f402250846262be", "span.op": "resource.css", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4431,6 +4495,7 @@ expression: metrics "span.group": "c7d3c9d83f92123a", "span.op": "resource.script", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1, @@ -4496,6 +4561,7 @@ expression: metrics "environment": "fake_environment", "span.op": "ui.interaction.click", "transaction": "gEt /api/:version/users/", + "transaction.op": "myop", }, metadata: BucketMetadata { merges: 1,