-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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(relay): Move histogram outliers to global config #71004
Conversation
@@ -1427,37 +1433,48 @@ def _produce_histogram_outliers(query_results: Any) -> Sequence[MetricConditiona | |||
# See also https://en.wikipedia.org/wiki/Outlier#Tukey's_fences | |||
{ | |||
"op": "gte", | |||
"name": "event.duration", | |||
"name": _HISTOGRAM_OUTLIERS_SOURCE_FIELDS[metric], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a bug that went unnoticed for a long time: p25
and p75
are either duration, LCP, or FCP, but the value we compare them to is always duration.
@@ -1013,7 +1013,7 @@ def _filter_option_to_config_setting(flt: _FilterSpec, setting: str) -> Mapping[ | |||
#: When you increment this version, outdated Relays will stop extracting | |||
#: transaction metrics. | |||
#: See https://github.com/getsentry/relay/blob/6181c6e80b9485ed394c40bc860586ae934704e2/relay-dynamic-config/src/metrics.rs#L85 | |||
TRANSACTION_METRICS_EXTRACTION_VERSION = 5 | |||
TRANSACTION_METRICS_EXTRACTION_VERSION = 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version bump needed because old Relays do not apply globally defined tags to legacy metrics (see getsentry/relay#3615).
pass | ||
|
||
consumer.close() | ||
assert histogram_outlier_tags == { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion will fail until getsentry/relay#3615 is merged (requires up to date relay docker image).
Prerequisite to getsentry/sentry#71004: Global tag mappings were not yet being applied to transaction metrics. Beside the bug fix, this PR also bumps the metrics extraction version(s), and attempts to simplify the extraction function for transactions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #71004 +/- ##
=======================================
Coverage 77.85% 77.86%
=======================================
Files 6533 6532 -1
Lines 291110 291110
Branches 50377 50372 -5
=======================================
+ Hits 226657 226660 +3
+ Misses 58218 58211 -7
- Partials 6235 6239 +4
|
Histogram outliers are a static piece of metrics extraction config that can be moved to global config. This will reduce network traffic, project config sizes in redis and first and foremost relay in-memory caches.
This PR also fixes a long-standing bug in the outlier config.
ref: https://github.com/getsentry/team-ingest/issues/331