diff --git a/relay-dynamic-config/src/global.rs b/relay-dynamic-config/src/global.rs index 321c4cbfc1..eba5f3e074 100644 --- a/relay-dynamic-config/src/global.rs +++ b/relay-dynamic-config/src/global.rs @@ -186,17 +186,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, - /// Overall sampling of span extraction. /// /// This number represents the fraction of transactions for which diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index e4867c0c01..0988beabf7 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -36,7 +36,7 @@ use crate::services::global_config::GlobalConfigHandle; use crate::services::outcome::{DiscardReason, Outcome, TrackOutcome}; use crate::services::processor::Processed; use crate::statsd::{RelayCounters, RelayTimers}; -use crate::utils::{is_rolled_out, FormDataIter, ThreadPool, TypedEnvelope, WorkerGroup}; +use crate::utils::{FormDataIter, ThreadPool, TypedEnvelope, WorkerGroup}; /// Fallback name used for attachment items without a `filename` header. const UNNAMED_ATTACHMENT: &str = "Unnamed Attachment"; @@ -257,7 +257,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, @@ -657,21 +656,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, @@ -680,7 +668,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 3846d79dfe..4f2e5b7fb0 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -1,4 +1,3 @@ -import pytest import json from sentry_sdk.envelope import Envelope, Item, PayloadRef @@ -88,26 +87,18 @@ def assert_expected_feedback(parsed_feedback, sent_feedback): } -@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, ): mini_sentry.add_basic_project_config( 42, extra={"config": {"features": ["organizations:user-feedback-ingest"]}} ) - 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) + other_consumer = events_consumer(timeout=20) feedback = generate_feedback_sdk_event() relay = relay_with_processing() @@ -124,18 +115,12 @@ def test_feedback_event_with_processing( other_consumer.assert_empty() -@pytest.mark.parametrize("use_feedback_topic", (False, True)) -def test_feedback_events_without_processing( - mini_sentry, relay_chain, use_feedback_topic -): +def test_feedback_events_without_processing(mini_sentry, relay_chain): project_id = 42 mini_sentry.add_basic_project_config( project_id, extra={"config": {"features": ["organizations:user-feedback-ingest"]}}, ) - 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") @@ -148,27 +133,19 @@ 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"]}} ) - 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) + other_consumer = events_consumer(timeout=20) + feedback_consumer = feedback_consumer(timeout=20) attachments_consumer = attachments_consumer(timeout=20) feedback = generate_feedback_sdk_event()