From 260a6f7caac51b589bba65e6ba9c4622d5d4245c Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 11 Oct 2023 09:32:03 +0200 Subject: [PATCH] ref(metrics): Stop producing has_profile on transactions/duration (#2589) Finishes the move to `c:transactions/usage@none`. --- CHANGELOG.md | 2 +- relay-server/src/metrics_extraction/transactions/mod.rs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98aa9eb6e3..30f4e33bd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ - Write span tags to `span.sentry_tags`. ([#2555](https://github.com/getsentry/relay/pull/2555)) - Use JSON instead of MsgPack for Kafka spans. ([#2556](https://github.com/getsentry/relay/pull/2556)) - Add `profile_id` to spans. ([#2569](https://github.com/getsentry/relay/pull/2569)) -- Introduce a dedicated usage metric for transactions that replaces the duration metric. ([#2571](https://github.com/getsentry/relay/pull/2571)) +- Introduce a dedicated usage metric for transactions that replaces the duration metric. ([#2571](https://github.com/getsentry/relay/pull/2571), [#2589](https://github.com/getsentry/relay/pull/2589)) - Restore the profiling killswitch. ([#2573](https://github.com/getsentry/relay/pull/2573)) - Add `scraping_attempts` field to the event schema. ([#2575](https://github.com/getsentry/relay/pull/2575)) diff --git a/relay-server/src/metrics_extraction/transactions/mod.rs b/relay-server/src/metrics_extraction/transactions/mod.rs index 6cd63e2057..7d684b8708 100644 --- a/relay-server/src/metrics_extraction/transactions/mod.rs +++ b/relay-server/src/metrics_extraction/transactions/mod.rs @@ -331,12 +331,18 @@ impl TransactionExtractor<'_> { // Duration let duration = relay_common::time::chrono_to_positive_millis(end - start); + let has_profile = if self.config.version >= 3 { + false + } else { + self.has_profile + }; + metrics.project_metrics.push( TransactionMetric::Duration { unit: DurationUnit::MilliSecond, value: duration, tags: TransactionDurationTags { - has_profile: self.has_profile, // TODO: Stop producing this in v3 + has_profile, universal_tags: tags.clone(), }, }