Skip to content

Commit c30a22c

Browse files
authored
ref(replays): Always combine payloads and remove feature flag (#4812)
We want to always combine payloads. This flag is always true.
1 parent cc71e5d commit c30a22c

File tree

6 files changed

+8
-86
lines changed

6 files changed

+8
-86
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
**Internal**:
6+
7+
- Always combine replay payloads and remove feature flag guarding it. ([#4812](https://github.com/getsentry/relay/pull/4812))
8+
39
## 25.6.0
410

511
**Features**:

relay-dynamic-config/src/feature.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ pub enum Feature {
2323
/// Serialized as `organizations:session-replay-recording-scrubbing`.
2424
#[serde(rename = "organizations:session-replay-recording-scrubbing")]
2525
SessionReplayRecordingScrubbing,
26-
/// Enables combining session replay envelope items (Replay Recordings and Replay Events).
27-
/// into one Kafka message.
28-
///
29-
/// Serialized as `organizations:session-replay-combined-envelope-items`.
30-
#[serde(rename = "organizations:session-replay-combined-envelope-items")]
31-
SessionReplayCombinedEnvelopeItems,
3226
/// Disables select organizations from processing mobile replay events.
3327
///
3428
/// Serialized as `organizations:session-replay-video-disabled`.

relay-server/src/envelope/item.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ impl Item {
3333
filename: None,
3434
routing_hint: None,
3535
rate_limited: false,
36-
replay_combined_payload: false,
3736
source_quantities: None,
3837
other: BTreeMap::new(),
3938
metrics_extracted: false,
@@ -282,17 +281,6 @@ impl Item {
282281
self.headers.source_quantities = Some(source_quantities);
283282
}
284283

285-
/// Returns if the payload's replay items should be combined into one kafka message.
286-
#[cfg(feature = "processing")]
287-
pub fn replay_combined_payload(&self) -> bool {
288-
self.headers.replay_combined_payload
289-
}
290-
291-
/// Sets the replay_combined_payload for this item.
292-
pub fn set_replay_combined_payload(&mut self, combined_payload: bool) {
293-
self.headers.replay_combined_payload = combined_payload;
294-
}
295-
296284
/// Returns the metrics extracted flag.
297285
pub fn metrics_extracted(&self) -> bool {
298286
self.headers.metrics_extracted
@@ -771,11 +759,6 @@ pub struct ItemHeaders {
771759
#[serde(default, skip)]
772760
rate_limited: bool,
773761

774-
/// Indicates that this item should be combined into one payload with other replay item.
775-
/// NOTE: This is internal-only and not exposed into the Envelope.
776-
#[serde(default, skip)]
777-
replay_combined_payload: bool,
778-
779762
/// Contains the amount of events this item was generated and aggregated from.
780763
///
781764
/// A [metrics buckets](`ItemType::MetricBuckets`) item contains metrics extracted and

relay-server/src/services/processor/replay.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ pub fn process(
8282
};
8383

8484
for item in managed_envelope.envelope_mut().items_mut() {
85-
if project_info.has_feature(Feature::SessionReplayCombinedEnvelopeItems) {
86-
item.set_replay_combined_payload(true);
87-
}
88-
8985
match item.ty() {
9086
ItemType::ReplayEvent => {
9187
let replay_event = handle_replay_event_item(item.payload(), &rpc)?;

relay-server/src/services/store.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,7 @@ impl StoreService {
279279
replay_recording = Some(item);
280280
}
281281
ItemType::ReplayEvent => {
282-
if item.replay_combined_payload() {
283-
replay_event = Some(item);
284-
}
285-
282+
replay_event = Some(item);
286283
self.produce_replay_event(
287284
event_id.ok_or(StoreError::NoEventId)?,
288285
scoping.project_id,

tests/integration/test_replay_combined_payload.py

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,7 @@ def test_replay_combined_with_processing(
1616
relay = relay_with_processing()
1717
mini_sentry.add_basic_project_config(
1818
project_id,
19-
extra={
20-
"config": {
21-
"features": [
22-
"organizations:session-replay",
23-
"organizations:session-replay-combined-envelope-items",
24-
]
25-
}
26-
},
19+
extra={"config": {"features": ["organizations:session-replay"]}},
2720
)
2821
replay_recordings_consumer = replay_recordings_consumer()
2922
replay_events_consumer = replay_events_consumer(timeout=10)
@@ -62,50 +55,3 @@ def test_replay_combined_with_processing(
6255
assert replay_event["type"] == "replay_event"
6356
assert replay_event["replay_id"] == replay_id
6457
assert replay_event_message["retention_days"] == 90
65-
66-
67-
def test_replay_combined_with_processing_no_flag_set(
68-
mini_sentry, relay_with_processing, replay_recordings_consumer
69-
):
70-
project_id = 42
71-
replay_id = "515539018c9b4260a6f999572f1661ee"
72-
relay = relay_with_processing()
73-
mini_sentry.add_basic_project_config(
74-
project_id,
75-
extra={
76-
"config": {
77-
"features": [
78-
"organizations:session-replay",
79-
]
80-
}
81-
},
82-
)
83-
replay_recordings_consumer = replay_recordings_consumer()
84-
85-
envelope = Envelope(
86-
headers=[
87-
[
88-
"event_id",
89-
replay_id,
90-
],
91-
["attachment_type", "replay_recording"],
92-
]
93-
)
94-
payload = recording_payload(b"[]")
95-
envelope.add_item(Item(payload=PayloadRef(bytes=payload), type="replay_recording"))
96-
97-
replay_event = generate_replay_sdk_event(replay_id=replay_id)
98-
envelope.add_item(Item(payload=PayloadRef(json=replay_event), type="replay_event"))
99-
100-
relay.send_envelope(project_id, envelope)
101-
102-
replay_recording_message = replay_recordings_consumer.get_not_chunked_replay(
103-
timeout=10
104-
)
105-
106-
assert replay_recording_message["type"] == "replay_recording_not_chunked"
107-
assert replay_recording_message["replay_id"] == replay_id
108-
109-
assert replay_recording_message["payload"] == payload
110-
111-
assert replay_recording_message["replay_event"] is None

0 commit comments

Comments
 (0)