Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(spans): tag user.geo.subregion on mobile spans #3927

Merged
merged 3 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Extract client sdk from transaction into profiles. ([#3915](https://github.com/getsentry/relay/pull/3915))
- Extract `user.geo.subregion` into span metrics/indexed. ([#3914](https://github.com/getsentry/relay/pull/3914))
- Add `last_peek` field to the `Priority` struct. ([#3922](https://github.com/getsentry/relay/pull/3922))
- Extract `user.geo.subregion` for mobile spans. ([#3927](https://github.com/getsentry/relay/pull/3927))

## 24.7.1

Expand Down
12 changes: 12 additions & 0 deletions relay-dynamic-config/src/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ pub fn hardcoded_span_metrics() -> Vec<(GroupKey, Vec<MetricSpec>, Vec<TagMappin
Tag::with_key("span.group")
.from_field("span.sentry_tags.group")
.always(),
Tag::with_key("user.geo.subregion")
.from_field("span.sentry_tags.user.geo.subregion")
.always(),
Tag::with_key("device.class")
.from_field("span.sentry_tags.device.class")
.always(),
Expand Down Expand Up @@ -506,6 +509,9 @@ pub fn hardcoded_span_metrics() -> Vec<(GroupKey, Vec<MetricSpec>, Vec<TagMappin
Tag::with_key("span.group")
.from_field("span.sentry_tags.group")
.always(),
Tag::with_key("user.geo.subregion")
.from_field("span.sentry_tags.user.geo.subregion")
.always(),
Tag::with_key("device.class")
.from_field("span.sentry_tags.device.class")
.always(),
Expand Down Expand Up @@ -541,6 +547,9 @@ pub fn hardcoded_span_metrics() -> Vec<(GroupKey, Vec<MetricSpec>, Vec<TagMappin
Tag::with_key("span.group")
.from_field("span.sentry_tags.group")
.always(),
Tag::with_key("user.geo.subregion")
.from_field("span.sentry_tags.user.geo.subregion")
.always(),
Tag::with_key("device.class")
.from_field("span.sentry_tags.device.class")
.always(),
Expand Down Expand Up @@ -576,6 +585,9 @@ pub fn hardcoded_span_metrics() -> Vec<(GroupKey, Vec<MetricSpec>, Vec<TagMappin
Tag::with_key("span.group")
.from_field("span.sentry_tags.group")
.always(),
Tag::with_key("user.geo.subregion")
.from_field("span.sentry_tags.user.geo.subregion")
.always(),
Tag::with_key("device.class")
.from_field("span.sentry_tags.device.class")
.always(),
Expand Down
9 changes: 9 additions & 0 deletions relay-server/src/metrics_extraction/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,15 @@ mod tests {
const MOBILE_EVENT: &str = r#"
{
"type": "transaction",
"user": {
"id": "user123",
"geo": {
"country_code": "US",
"city": "Washington",
"subdivision": "Virginia",
"region": "United States"
}
},
"sdk": {"name": "sentry.javascript.react-native"},
"start_timestamp": "2021-04-26T07:59:01+0100",
"timestamp": "2021-04-26T08:00:00+0100",
Expand Down
Loading
Loading