Skip to content

Commit

Permalink
feat(spans): tag resource specific metrics with user.geo.subregion (#…
Browse files Browse the repository at this point in the history
…3934)

work towards getsentry/sentry#75230

This should allow all the asset module to be filtered down on user
subregion.
  • Loading branch information
DominikB2014 authored Aug 19, 2024
1 parent ee2f764 commit ca3dd18
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- 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))
- Rename `Peek` to `EnvelopeBufferGuard`. ([#3930](https://github.com/getsentry/relay/pull/3930))
- Tag `user.geo.subregion` for resource metrics. ([#3934](https://github.com/getsentry/relay/pull/3934))

## 24.7.1

Expand Down
9 changes: 9 additions & 0 deletions relay-dynamic-config/src/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ pub fn hardcoded_span_metrics() -> Vec<(GroupKey, Vec<MetricSpec>, Vec<TagMappin
Tag::with_key("transaction")
.from_field("span.sentry_tags.transaction")
.always(), // already guarded by condition on metric
Tag::with_key("user.geo.subregion")
.from_field("span.sentry_tags.user.geo.subregion")
.always(), // already guarded by condition on metric
],
},
MetricSpec {
Expand Down Expand Up @@ -303,6 +306,9 @@ pub fn hardcoded_span_metrics() -> Vec<(GroupKey, Vec<MetricSpec>, Vec<TagMappin
Tag::with_key("span.op")
.from_field("span.sentry_tags.op")
.always(), // already guarded by condition on metric
Tag::with_key("user.geo.subregion")
.from_field("span.sentry_tags.user.geo.subregion")
.always(), // already guarded by condition on metric
],
},
MetricSpec {
Expand Down Expand Up @@ -335,6 +341,9 @@ pub fn hardcoded_span_metrics() -> Vec<(GroupKey, Vec<MetricSpec>, Vec<TagMappin
Tag::with_key("span.op")
.from_field("span.sentry_tags.op")
.always(), // already guarded by condition on metric
Tag::with_key("user.geo.subregion")
.from_field("span.sentry_tags.user.geo.subregion")
.always(), // already guarded by condition on metric
],
},
MetricSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4379,6 +4379,7 @@ expression: metrics
"span.group": "d744fa0716ef1142",
"span.op": "resource.css",
"transaction": "gEt /api/:version/users/",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4407,6 +4408,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "d744fa0716ef1142",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4435,6 +4437,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "d744fa0716ef1142",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4606,6 +4609,7 @@ expression: metrics
"span.group": "89bda2e660f6236c",
"span.op": "resource.script",
"transaction": "gEt /api/:version/users/",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4634,6 +4638,7 @@ expression: metrics
"span.domain": "*.example.com:5688",
"span.group": "89bda2e660f6236c",
"span.op": "resource.script",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4662,6 +4667,7 @@ expression: metrics
"span.domain": "*.example.com:5688",
"span.group": "89bda2e660f6236c",
"span.op": "resource.script",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -8346,6 +8352,7 @@ expression: metrics
"span.group": "7f402250846262be",
"span.op": "resource.css",
"transaction": "gEt /api/:version/users/",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -8374,6 +8381,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "7f402250846262be",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -8402,6 +8410,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "7f402250846262be",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4077,6 +4077,7 @@ expression: metrics
"span.group": "d744fa0716ef1142",
"span.op": "resource.css",
"transaction": "gEt /api/:version/users/",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4105,6 +4106,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "d744fa0716ef1142",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4133,6 +4135,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "d744fa0716ef1142",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4304,6 +4307,7 @@ expression: metrics
"span.group": "89bda2e660f6236c",
"span.op": "resource.script",
"transaction": "gEt /api/:version/users/",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4332,6 +4336,7 @@ expression: metrics
"span.domain": "*.example.com:5688",
"span.group": "89bda2e660f6236c",
"span.op": "resource.script",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -4360,6 +4365,7 @@ expression: metrics
"span.domain": "*.example.com:5688",
"span.group": "89bda2e660f6236c",
"span.op": "resource.script",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -7775,6 +7781,7 @@ expression: metrics
"span.group": "7f402250846262be",
"span.op": "resource.css",
"transaction": "gEt /api/:version/users/",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -7803,6 +7810,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "7f402250846262be",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down Expand Up @@ -7831,6 +7839,7 @@ expression: metrics
"span.domain": "*.domain.com",
"span.group": "7f402250846262be",
"span.op": "resource.css",
"user.geo.subregion": "155",
},
metadata: BucketMetadata {
merges: 1,
Expand Down

0 comments on commit ca3dd18

Please sign in to comment.