From 27fbb4ddb1a108297c2ddf4ce2c9ff477630114a Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki Date: Tue, 10 Sep 2024 12:31:48 -0400 Subject: [PATCH 1/3] check platform --- .../src/normalize/span/tag_extraction.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/relay-event-normalization/src/normalize/span/tag_extraction.rs b/relay-event-normalization/src/normalize/span/tag_extraction.rs index ce00111c90..55a2c59077 100644 --- a/relay-event-normalization/src/normalize/span/tag_extraction.rs +++ b/relay-event-normalization/src/normalize/span/tag_extraction.rs @@ -320,8 +320,9 @@ fn extract_shared_tags(event: &Event) -> BTreeMap { } // We only want this on frontend or mobile modules. - let should_extract_geo = - event.context::().is_some() || MOBILE_SDKS.contains(&event.sdk_name()); + let should_extract_geo = (event.context::().is_some() + && event.platform.as_str() == Some("javascript")) + || MOBILE_SDKS.contains(&event.sdk_name()); if should_extract_geo { if let Some(country_code) = user.geo.value().and_then(|geo| geo.country_code.value()) { @@ -2745,6 +2746,9 @@ LIMIT 1 "trace": { "trace_id": "ff62a8b040f340bda5d830223def1d81", "span_id": "bd429c44b67a3eb4" + }, + "browser": { + "name": "Chrome" } }, "user": { From 03188a30a396f5fb12d191df48f20b1c7897a135 Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki Date: Tue, 10 Sep 2024 12:35:39 -0400 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30f0c68da3..7cc982361b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ - Remove the `generate-schema` tool. Relay no longer exposes JSON schema for the event protocol. Consult the Rust type documentation of the `relay-event-schema` crate instead. ([#3974](https://github.com/getsentry/relay/pull/3974)) - Allow creation of `SqliteEnvelopeBuffer` from config, and load existing stacks from db on startup. ([#3967](https://github.com/getsentry/relay/pull/3967)) - Only tag `user.geo.subregion` on frontend and mobile projects. ([#4013](https://github.com/getsentry/relay/pull/4013)) +- Check if sdk platform is `javascript` for `user.geo.subregion` tag. ([#4023](https://github.com/getsentry/relay/pull/4023)) ## 24.8.0 From 8c46667723897e42e986b2b5ac43a6e181b3406b Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:42:31 -0400 Subject: [PATCH 3/3] Update CHANGELOG.md Co-authored-by: Joris Bayer --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cc982361b..feaacb3e64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,8 +27,7 @@ - Remove the OTEL spans endpoint in favor of Envelopes. ([#3973](https://github.com/getsentry/relay/pull/3973)) - Remove the `generate-schema` tool. Relay no longer exposes JSON schema for the event protocol. Consult the Rust type documentation of the `relay-event-schema` crate instead. ([#3974](https://github.com/getsentry/relay/pull/3974)) - Allow creation of `SqliteEnvelopeBuffer` from config, and load existing stacks from db on startup. ([#3967](https://github.com/getsentry/relay/pull/3967)) -- Only tag `user.geo.subregion` on frontend and mobile projects. ([#4013](https://github.com/getsentry/relay/pull/4013)) -- Check if sdk platform is `javascript` for `user.geo.subregion` tag. ([#4023](https://github.com/getsentry/relay/pull/4023)) +- Only tag `user.geo.subregion` on frontend and mobile projects. ([#4013](https://github.com/getsentry/relay/pull/4013), [#4023](https://github.com/getsentry/relay/pull/4023)) ## 24.8.0