Issue
I want to know what data scrubbing options Sentry provides for compliance, privacy, and PII.
Applies To
All SaaS Customers
Data Scrubbing
Resolution
Yes. The important distinction is where the scrubbing happens and therefore whether the sensitive data ever reaches Sentry.
SDK scrubbing: happens before the event leaves your application. Use
beforeSendor equivalent SDK hooks when your requirement is that sensitive data never leave your environment. Scrubbing sensitive data
Server-side scrubbing: Sentry applies built-in redaction by default, including credit-card-like values and common sensitive keys such as
passwordandtoken. You can extend this with Additional Sensitive Fields and exempt specific values with Safe Fields. Organization-level rules override project-level rules. Server-Side Data Scrubbing
Advanced Data Scrubbing: provides more precise selectors and actions such as remove, mask, hash, and replace, applied immediately before storage. Advanced Data Scrubbing
Attachments and Session Replay: have their own privacy/scrubbing mechanisms, so configuring event scrubbing alone isn't necessarily sufficient. Attachment Scrubbing Session Replay privacy
Relay: can act as a proxy in your infrastructure, allowing data filtering/control before forwarding events to Sentry. Relay
Rule of thumb: if the requirement is “this data must never leave our systems,” don't rely on Sentry's server-side scrubbing. Remove it in the SDK (or an infrastructure-controlled Relay) before transmission.
Also, scrubbing is generally not retroactive for events that have already reached Sentry, so prevention is preferable to trying to clean up stored events later. Data Scrubbing overview
