Skip to content

feat(processor): Migrate process_replay#5580

Merged
tobias-wilfert merged 29 commits intomasterfrom
tobias-wilfert/feat/process_replay
Feb 2, 2026
Merged

feat(processor): Migrate process_replay#5580
tobias-wilfert merged 29 commits intomasterfrom
tobias-wilfert/feat/process_replay

Conversation

@tobias-wilfert
Copy link
Member

@tobias-wilfert tobias-wilfert commented Jan 26, 2026

Migrates the process_replay logic to our new processor architecture.

To not take any unnecessary risk this will be a partial rollout to test on selected orgs first before deploying to everyone, since we don't have enough traffic on our 'staging' environment to use that as testing.

Added a list of follow ups to the ticket.

Related: INGEST-515

@tobias-wilfert tobias-wilfert self-assigned this Jan 26, 2026
@linear
Copy link

linear bot commented Jan 26, 2026

@tobias-wilfert tobias-wilfert changed the title WIP: migrate process_replay feat(processor): Migrate process_replay Jan 29, 2026
@tobias-wilfert tobias-wilfert marked this pull request as ready for review January 29, 2026 07:27
@tobias-wilfert tobias-wilfert requested a review from a team as a code owner January 29, 2026 07:27
Comment on lines 165 to 171
let datascrubbing_config = ctx
.project_info
.config
.datascrubbing_settings
.pii_config()
.map_err(|e| Error::PiiConfigError(e.clone()))?
.as_ref();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to pull this out of the retain.

Possibly even the RecordingScrubber, need to check if it keeps state.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RecordingScrubber has some internal state sadly, but I hope that this is a none-issue once the logging confirms the hypothesis that we only get one 'replay' per envelope.

Comment on lines +348 to +350
envelope.add_item(
Item(payload=PayloadRef(bytes=b"{}\n[]"), type="replay_recording")
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this? To get more coverage out of the integration tests?

Copy link
Member Author

@tobias-wilfert tobias-wilfert Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added since the new logic enforces that the recording and event should be send in the same envelope (like the devdocs already say should be the case A "replay_event" Item should always be sent with a "replay_recording" Item in the same envelope.).

The tests previously just send the event and hence failed on the new logic.

|replays| &mut replays.replays,
|replay, _| {
let event = replay.get_event().value().ok_or(Error::NoEventContent)?;
replay::validate(event).map_err(|e| Error::InvalidPayload(e.to_string()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Looks like we could move replay::validate to this module, it does not normalize anything.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

tobias-wilfert added a commit to getsentry/sentry that referenced this pull request Feb 2, 2026
priscilawebdev pushed a commit to getsentry/sentry that referenced this pull request Feb 2, 2026
@tobias-wilfert tobias-wilfert added this pull request to the merge queue Feb 2, 2026
Merged via the queue into master with commit 9b7e464 Feb 2, 2026
29 checks passed
@tobias-wilfert tobias-wilfert deleted the tobias-wilfert/feat/process_replay branch February 2, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants