Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to redact part of the URL within a Session Replay #8127

Closed
Prithvirajkumar opened this issue May 12, 2023 · 1 comment · Fixed by #8124
Closed

Option to redact part of the URL within a Session Replay #8127

Prithvirajkumar opened this issue May 12, 2023 · 1 comment · Fixed by #8124
Assignees

Comments

@Prithvirajkumar
Copy link
Member

Problem Statement

Currently, it is possible to redact part of the URL for Errors and Transactions using addGlobalEventProcessor to modify event.request.url and event.request.headers.

For example, if the URL is /Redactme-xyz, this can be changed to /[REDACTED]-xyz.

However, this does not seem to work for Session Replays.

The requirement is for the addGlobalEventProcessor configuration to apply to Session Replays or to have a separate data scrubbing option in place to scrub/redact this data.

Solution Brainstorm

No response

Product Area

Replays

@getsantry
Copy link

getsantry bot commented May 12, 2023

Routing to @getsentry/product-owners-replays for triage, due by Tuesday, May 16th at 11:00 (yyz). ⏲️

@billyvg billyvg transferred this issue from getsentry/sentry May 16, 2023
@billyvg billyvg self-assigned this May 16, 2023
billyvg added a commit that referenced this issue May 17, 2023
Allows you to modify/filter custom recording events for replays. Note this is only a recording event, not the replay event. Custom means that the events do not relate or affect the DOM recording, but rather they are additional events that the Replay integration adds for additional features.

This adds an option for the Replay integration `beforeAddRecordingEvent` to process a recording (rrweb) event before it is added to the event buffer. Example:

```javascript
new Sentry.Replay({
  beforeAddRecordingEvent: (event) => {
    // Filter out specific events
    if (event.data.tag === 'foo') {
      return null;
    }

    // Remember to return an event if you want to keep it!
    return event;
  }
});
```

Closes #8127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants