Skip to content

Commit

Permalink
Revert "feat(replays): Enable PII scrubbing for all organizations" (#…
Browse files Browse the repository at this point in the history
…1747)

Reverts #1678

This is the suspected change increased the event's processing time. And
maybe introduced a memory leak.
  • Loading branch information
olksdr authored Jan 16, 2023
1 parent 5ccec48 commit 37f965b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion relay-server/src/actors/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ impl EnvelopeProcessorService {
ItemType::ReplayRecording => {
// XXX: Temporarily, only the Sentry org will be allowed to parse replays while
// we measure the impact of this change.
if replays_enabled {
if replays_enabled && state.project_state.organization_id == Some(1) {
// Limit expansion of recordings to the max replay size. The payload is
// decompressed temporarily and then immediately re-compressed. However, to
// limit memory pressure, we use the replay limit as a good overall limit for
Expand Down
14 changes: 5 additions & 9 deletions tests/integration/test_replay_recordings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import zlib
import time

from sentry_sdk.envelope import Envelope, Item, PayloadRef

Expand Down Expand Up @@ -92,6 +92,8 @@ def test_chunked_replay_recordings_processing(
assert replay_recording["received"]
assert type(replay_recording["received"]) == int

outcomes_consumer.assert_empty()


def test_nonchunked_replay_recordings_processing(
mini_sentry, relay_with_processing, replay_recordings_consumer, outcomes_consumer
Expand All @@ -115,8 +117,7 @@ def test_nonchunked_replay_recordings_processing(
["attachment_type", "replay_recording"],
]
)
payload = recording_payload(b"[]")
envelope.add_item(Item(payload=PayloadRef(bytes=payload), type="replay_recording"))
envelope.add_item(Item(payload=PayloadRef(bytes=b"test"), type="replay_recording"))

relay.send_envelope(project_id, envelope)

Expand All @@ -128,12 +129,7 @@ def test_nonchunked_replay_recordings_processing(
assert replay_recording["org_id"] == org_id
assert type(replay_recording["received"]) == int
assert replay_recording["retention_days"] == 90
assert replay_recording["payload"] == payload
assert replay_recording["payload"] == b"test"
assert replay_recording["type"] == "replay_recording_not_chunked"

outcomes_consumer.assert_empty()


def recording_payload(bits: bytes):
compressed_payload = zlib.compress(bits)
return b'{"segment_id": 0}\n' + compressed_payload

0 comments on commit 37f965b

Please sign in to comment.