From 3c7fb2b346a40a50aa1b4420d1f3de97fc8a661e Mon Sep 17 00:00:00 2001 From: Riccardo Busetti Date: Tue, 31 Oct 2023 08:47:57 +0100 Subject: [PATCH 1/3] fix(on-demand): Add url field to the event getter --- relay-event-schema/src/protocol/event.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/relay-event-schema/src/protocol/event.rs b/relay-event-schema/src/protocol/event.rs index 4978b40668..4ea7a633d5 100644 --- a/relay-event-schema/src/protocol/event.rs +++ b/relay-event-schema/src/protocol/event.rs @@ -650,6 +650,7 @@ impl Getter for Event { "user.geo.region" => self.user.value()?.geo.value()?.region.as_str()?.into(), "user.geo.subdivision" => self.user.value()?.geo.value()?.subdivision.as_str()?.into(), "request.method" => self.request.value()?.method.as_str()?.into(), + "request.url" => self.request.value()?.url.as_str()?.into(), "sdk.name" => self.client_sdk.value()?.name.as_str()?.into(), "sdk.version" => self.client_sdk.value()?.version.as_str()?.into(), From 75e6e935d57042b0faa14767625b506525be367e Mon Sep 17 00:00:00 2001 From: Riccardo Busetti Date: Tue, 31 Oct 2023 08:49:18 +0100 Subject: [PATCH 2/3] Fix --- relay-event-schema/src/protocol/event.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/relay-event-schema/src/protocol/event.rs b/relay-event-schema/src/protocol/event.rs index 4ea7a633d5..1731bf5ce4 100644 --- a/relay-event-schema/src/protocol/event.rs +++ b/relay-event-schema/src/protocol/event.rs @@ -1069,6 +1069,7 @@ mod tests { Annotated::new("user-agent".into()), Annotated::new("Slurp".into()), ))]))), + url: Annotated::new("https://sentry.io".into()), ..Default::default() }), transaction: Annotated::new("some-transaction".into()), @@ -1178,6 +1179,10 @@ mod tests { Some(Val::Uuid(uuid!("abadcade-feed-dead-beef-baddadfeeded"))), event.get_value("event.contexts.device.uuid") ); + assert_eq!( + Some(Val::String("https://sentry.io")), + event.get_value("event.request.url") + ); } #[test] From 388f9b29f4ed1fcf05039d4fe437864443220fee Mon Sep 17 00:00:00 2001 From: Riccardo Busetti Date: Tue, 31 Oct 2023 11:05:39 +0100 Subject: [PATCH 3/3] Add changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aba39a5345..ec4d9e6f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Group resource spans by scrubbed domain and filename. ([#2654](https://github.com/getsentry/relay/pull/2654)) - Convert transactions to spans for all organizations. ([#2659](https://github.com/getsentry/relay/pull/2659)) - Filter outliers (>180s) for mobile measurements. ([#2649](https://github.com/getsentry/relay/pull/2649)) -- Allow access to more context fields in dynamic sampling and metric extraction. ([#2607](https://github.com/getsentry/relay/pull/2607), [#2640](https://github.com/getsentry/relay/pull/2640)) +- Allow access to more context fields in dynamic sampling and metric extraction. ([#2607](https://github.com/getsentry/relay/pull/2607), [#2640](https://github.com/getsentry/relay/pull/2640), [#2675](https://github.com/getsentry/relay/pull/2675)) - Allow advanced scrubbing expressions for datascrubbing safe fields. ([#2670](https://github.com/getsentry/relay/pull/2670)) **Bug Fixes**: