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

ref(metrics): Stop producing has_profile on transactions/duration #2589

Merged
merged 2 commits into from
Oct 11, 2023
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
8 changes: 7 additions & 1 deletion relay-server/src/metrics_extraction/transactions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
}
Expand Down