From 253f16c202baed40986b65f4d5ee58d9fa843783 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Mon, 22 May 2023 18:47:40 +0200 Subject: [PATCH 1/2] fix: Remove profiling feature flag --- relay-dynamic-config/src/feature.rs | 4 ---- relay-server/src/actors/processor.rs | 18 +++++++----------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/relay-dynamic-config/src/feature.rs b/relay-dynamic-config/src/feature.rs index b485ea67bd..9a0006d9b0 100644 --- a/relay-dynamic-config/src/feature.rs +++ b/relay-dynamic-config/src/feature.rs @@ -5,8 +5,6 @@ use serde::{Deserialize, Serialize}; /// Features exposed by project config. #[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Hash)] pub enum Feature { - /// Enables ingestion and normalization of profiles. - Profiling, /// Enables ingestion of Session Replays (Replay Recordings and Replay Events). SessionReplay, /// Enables data scrubbing of replay recording payloads. @@ -28,7 +26,6 @@ impl<'de> Deserialize<'de> for Feature { { let feature_name = Cow::::deserialize(deserializer)?; Ok(match feature_name.as_ref() { - "organizations:profiling" => Feature::Profiling, "organizations:session-replay" => Feature::SessionReplay, "organizations:session-replay-recording-scrubbing" => { Feature::SessionReplayRecordingScrubbing @@ -46,7 +43,6 @@ impl Serialize for Feature { S: serde::Serializer, { serializer.serialize_str(match self { - Feature::Profiling => "organizations:profiling", Feature::SessionReplay => "organizations:session-replay", Feature::SessionReplayRecordingScrubbing => { "organizations:session-replay-recording-scrubbing" diff --git a/relay-server/src/actors/processor.rs b/relay-server/src/actors/processor.rs index 8d0248c07b..2ab191b643 100644 --- a/relay-server/src/actors/processor.rs +++ b/relay-server/src/actors/processor.rs @@ -1044,19 +1044,15 @@ impl EnvelopeProcessorService { } } - /// Remove profiles from the envelope if the feature flag is not enabled. + /// Remove profiles from the envelope if they can not be parsed fn filter_profiles(&self, state: &mut ProcessEnvelopeState) { - let profiling_enabled = state.project_state.has_feature(Feature::Profiling); state.managed_envelope.retain_items(|item| match item.ty() { - ItemType::Profile if !profiling_enabled => ItemAction::DropSilently, - ItemType::Profile if profiling_enabled => { - match relay_profiling::parse_metadata(&item.payload()) { - Ok(_) => ItemAction::Keep, - Err(err) => ItemAction::Drop(Outcome::Invalid(DiscardReason::Profiling( - relay_profiling::discard_reason(err), - ))), - } - } + ItemType::Profile => match relay_profiling::parse_metadata(&item.payload()) { + Ok(_) => ItemAction::Keep, + Err(err) => ItemAction::Drop(Outcome::Invalid(DiscardReason::Profiling( + relay_profiling::discard_reason(err), + ))), + }, _ => ItemAction::Keep, }); } From c5c4e7c4035ce99df9f9ec18a1eb1fa457ee485b Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Mon, 22 May 2023 19:04:19 +0200 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae8c8f5764..f3e11705e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug Fixes**: - Sample only transaction events instead of sampling both transactions and errors. ([#2130](https://github.com/getsentry/relay/pull/2130)) +- Remove profiling feature flag. ([#2146](https://github.com/getsentry/relay/pull/2146)) **Internal**: