diff --git a/relay-dynamic-config/src/global.rs b/relay-dynamic-config/src/global.rs index e25eed2d9e..fd2bd4aeb3 100644 --- a/relay-dynamic-config/src/global.rs +++ b/relay-dynamic-config/src/global.rs @@ -187,17 +187,6 @@ pub struct Options { )] pub metric_stats_rollout_rate: f32, - /// Rollout rate for producing to the ingest-feedback-events topic. - /// - /// Rate needs to be between `0.0` and `1.0`. - /// If set to `1.0` all organizations will ingest to the feedback topic. - #[serde( - rename = "feedback.ingest-topic.rollout-rate", - deserialize_with = "default_on_error", - skip_serializing_if = "is_default" - )] - pub feedback_ingest_topic_rollout_rate: f32, - /// Flag for handling feedback and attachments in the same envelope. This is for the SDK team to send less requests /// for the user feedback screenshots feature. Prior to this change, feedback sent w/attachments would be produced /// to the attachments topic, rather than its own topic. The items are now split up accordingly. diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index dcffbde634..6b8eecb65e 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -34,9 +34,7 @@ use crate::services::global_config::GlobalConfigHandle; use crate::services::outcome::{DiscardReason, Outcome, TrackOutcome}; use crate::services::processor::Processed; use crate::statsd::RelayCounters; -use crate::utils::{ - is_rolled_out, ArrayEncoding, BucketEncoder, ExtractionMode, FormDataIter, TypedEnvelope, -}; +use crate::utils::{ArrayEncoding, BucketEncoder, ExtractionMode, FormDataIter, TypedEnvelope}; /// Fallback name used for attachment items without a `filename` header. const UNNAMED_ATTACHMENT: &str = "Unnamed Attachment"; @@ -212,16 +210,7 @@ impl StoreService { } else if event_item.as_ref().map(|x| x.ty()) == Some(&ItemType::Transaction) { KafkaTopic::Transactions } else if event_item.as_ref().map(|x| x.ty()) == Some(&ItemType::UserReportV2) { - let feedback_ingest_topic_rollout_rate = self - .global_config - .current() - .options - .feedback_ingest_topic_rollout_rate; - if is_rolled_out(scoping.organization_id, feedback_ingest_topic_rollout_rate) { - KafkaTopic::Feedback - } else { - KafkaTopic::Events - } + KafkaTopic::Feedback } else { KafkaTopic::Events }; @@ -256,7 +245,6 @@ impl StoreService { self.produce_user_report_v2( event_id.ok_or(StoreError::NoEventId)?, scoping.project_id, - scoping.organization_id, start_time, item, remote_addr, @@ -667,21 +655,10 @@ impl StoreService { &self, event_id: EventId, project_id: ProjectId, - organization_id: u64, start_time: Instant, item: &Item, remote_addr: Option, ) -> Result<(), StoreError> { - // check rollout rate option (effectively a FF) to determine whether to produce to new infra - let global_config = self.global_config.current(); - let feedback_ingest_topic_rollout_rate = - global_config.options.feedback_ingest_topic_rollout_rate; - let topic = if is_rolled_out(organization_id, feedback_ingest_topic_rollout_rate) { - KafkaTopic::Feedback - } else { - KafkaTopic::Events - }; - let message = KafkaMessage::Event(EventKafkaMessage { project_id, event_id, @@ -690,7 +667,7 @@ impl StoreService { remote_addr, attachments: vec![], }); - self.produce(topic, message) + self.produce(KafkaTopic::Feedback, message) } fn send_metric_message( diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index a3a8df6791..6311e9e389 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -89,13 +89,11 @@ def assert_expected_feedback(parsed_feedback, sent_feedback): @pytest.mark.parametrize("use_feedback_ingest_v2", (False, True)) -@pytest.mark.parametrize("use_feedback_topic", (False, True)) def test_feedback_event_with_processing( mini_sentry, relay_with_processing, events_consumer, feedback_consumer, - use_feedback_topic, use_feedback_ingest_v2, ): mini_sentry.add_basic_project_config( @@ -105,14 +103,8 @@ def test_feedback_event_with_processing( "feedback.ingest-inline-attachments", use_feedback_ingest_v2 ) - if use_feedback_topic: - mini_sentry.set_global_config_option("feedback.ingest-topic.rollout-rate", 1.0) - consumer = feedback_consumer(timeout=20) - other_consumer = events_consumer(timeout=20) - else: - mini_sentry.set_global_config_option("feedback.ingest-topic.rollout-rate", 0.0) - consumer = events_consumer(timeout=20) - other_consumer = feedback_consumer(timeout=20) + consumer = feedback_consumer(timeout=20) + events_consumer = events_consumer(timeout=20) feedback = generate_feedback_sdk_event() relay = relay_with_processing() @@ -125,14 +117,13 @@ def test_feedback_event_with_processing( # Assert required fields were returned assert_expected_feedback(parsed_feedback, feedback) - # test message wasn't dup'd to the wrong topic - other_consumer.assert_empty() + # test message wasn't dup'd to the event topic + events_consumer.assert_empty() @pytest.mark.parametrize("use_feedback_ingest_v2", (False, True)) -@pytest.mark.parametrize("use_feedback_topic", (False, True)) def test_feedback_events_without_processing( - mini_sentry, relay_chain, use_feedback_topic, use_feedback_ingest_v2 + mini_sentry, relay_chain, use_feedback_ingest_v2 ): project_id = 42 mini_sentry.add_basic_project_config( @@ -142,9 +133,6 @@ def test_feedback_events_without_processing( mini_sentry.set_global_config_option( "feedback.ingest-inline-attachments", use_feedback_ingest_v2 ) - mini_sentry.set_global_config_option( - "feedback.ingest-topic.rollout-rate", 1.0 if use_feedback_topic else 0.0 - ) replay_item = generate_feedback_sdk_event() relay = relay_chain(min_relay_version="latest") @@ -157,14 +145,12 @@ def test_feedback_events_without_processing( assert userfeedback.type == "feedback" -@pytest.mark.parametrize("use_feedback_topic", (False, True)) def test_feedback_with_attachment_in_same_envelope( mini_sentry, relay_with_processing, feedback_consumer, events_consumer, attachments_consumer, - use_feedback_topic, ): mini_sentry.add_basic_project_config( 42, extra={"config": {"features": ["organizations:user-feedback-ingest"]}} @@ -172,15 +158,9 @@ def test_feedback_with_attachment_in_same_envelope( # Test will only pass with this option set mini_sentry.set_global_config_option("feedback.ingest-inline-attachments", True) - if use_feedback_topic: - mini_sentry.set_global_config_option("feedback.ingest-topic.rollout-rate", 1.0) - other_consumer = events_consumer(timeout=20) - feedback_consumer = feedback_consumer(timeout=20) - else: - mini_sentry.set_global_config_option("feedback.ingest-topic.rollout-rate", 0.0) - other_consumer = feedback_consumer(timeout=20) - feedback_consumer = events_consumer(timeout=20) + feedback_consumer = feedback_consumer(timeout=20) attachments_consumer = attachments_consumer(timeout=20) + events_consumer = events_consumer(timeout=20) feedback = generate_feedback_sdk_event() event_id = feedback["event_id"] @@ -233,8 +213,8 @@ def test_feedback_with_attachment_in_same_envelope( # Assert required fields were returned assert_expected_feedback(parsed_feedback, feedback) - # test message wasn't dup'd to the wrong topic - other_consumer.assert_empty() + # test message wasn't dup'd to the events topic + events_consumer.assert_empty() - # test message wasn't sent to attachments topic + # test no extra messages (e.g. the feedback) were sent to the attachments topic attachments_consumer.assert_empty()