Skip to content

Commit

Permalink
fix(dynamic-config): Expose metric extraction to all Relays (#2440)
Browse files Browse the repository at this point in the history
Metric extraction configuration was not added to `LimitedProjectConfig`.
For this reason, external Relays would not see specs for on-demand
metric extraction. All traffic ingested through Relay PoPs or external
Relays therefore was missing on-demand metrics.
  • Loading branch information
jan-auer authored Aug 30, 2023
1 parent fe673fb commit 6a7b073
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Filter out exceptions originating in Safari extensions. ([#2408](https://github.com/getsentry/relay/pull/2408))
- Fixes the `TraceContext.status` not being defaulted to `unknown` before the new metrics extraction pipeline. ([#2436](https://github.com/getsentry/relay/pull/2436))
- Support on-demand metrics for alerts and widgets in external Relays. ([#2440](https://github.com/getsentry/relay/pull/2440))

## 23.8.0

Expand Down
2 changes: 2 additions & 0 deletions relay-dynamic-config/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ pub struct LimitedProjectConfig {
pub session_metrics: SessionMetricsConfig,
#[serde(skip_serializing_if = "Option::is_none")]
pub transaction_metrics: Option<ErrorBoundary<TransactionMetricsConfig>>,
#[serde(default, skip_serializing_if = "skip_metrics_extraction")]
pub metric_extraction: ErrorBoundary<MetricExtractionConfig>,
#[serde(skip_serializing_if = "Vec::is_empty")]
pub metric_conditional_tagging: Vec<TaggingRule>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,8 @@ def test_generic_metric_extraction(mini_sentry, relay):
transaction["timestamp"] = timestamp.isoformat()
transaction["start_timestamp"] = (timestamp - timedelta(seconds=2)).isoformat()

relay = relay(mini_sentry, options=TEST_CONFIG)
# Explicitly test a chain of Relays
relay = relay(relay(mini_sentry, options=TEST_CONFIG), options=TEST_CONFIG)
relay.send_transaction(PROJECT_ID, transaction)

envelope = mini_sentry.captured_events.get(timeout=3)
Expand Down

0 comments on commit 6a7b073

Please sign in to comment.