Repository navigation
docs: Add "Data Scrubbing" spec, update docs on parametrization and scrubbing - #19908
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Please update the IS YOUR CHANGE URGENT? section of the PR description:
This information helps the Docs team prioritize your review. |
|
Services awaiting deployment · Rollout details Warning Rollouts can't watch this change after it deploys: every data source for this team needs to be signed in again, so a check has no telemetry to read. Sign in to your data sources, or ask a team admin to.
Mention |
| ## Overview | ||
|
|
||
| </Alert> | ||
| This spec defines which sensitive data the SDK removes and which sensitive data Relay removes. It also defines parameterization. Parameterization and scrubbing can use the same operations, but they have different purposes. |
There was a problem hiding this comment.
I think I'd prefer a split between client side/SDK scrubbing and server side scrubbing (Relay) and using that terminology instead of mentioning Relay directly.
| - [Mark that part of the protocol on Relay](https://github.com/getsentry/relay/pull/1383) as such. This allows [data scrubbing](https://docs.sentry.io/product/relay/) to run on those fields. | ||
| - **Not collecting**: The SDK does not read the data. A `dataCollection` option controls this for each data category. | ||
| - **Parameterization**: The SDK replaces the variable parts of a value with placeholders, for example `SELECT * FROM users WHERE id = ?` or `/users/:id`. The result has low cardinality, so Sentry can group and search by it. | ||
| - **Scrubbing**: The SDK or Relay replaces a sensitive value with `"[Filtered]"`. The structure and the key names stay the same. |
There was a problem hiding this comment.
Technically on the server side we also allow for different replacements than [Filtered] this is just our default for the default rules.
| As of 2026-10-12, Relay does not parse payloads in span attributes. Relay applies its rules to the whole attribute value: | ||
|
|
||
| - If the value contains a sensitive word, such as `password`, `secret`, or `auth`, Relay replaces the whole value with `"[Filtered]"`. | ||
| - Relay replaces other matches, such as credit card numbers, in place. | ||
| - Relay does not remove literals from `db.query.text`. Relay adds a parameterized copy in `sentry.normalized_db_query` for grouping. | ||
| - By default, Relay does not scrub email addresses or IP addresses. |
There was a problem hiding this comment.
This largely depends on the users project and organization settings and I'd instead link to our server side scrubbing docs.
Say what the SDK does: send each value in its own attribute or list entry, and do not join the values into one string. Add a request header example and name Sentry Conventions as the place that defines the attributes.
…parametrization # Conflicts: # develop-docs/sdk/foundations/client/data-collection/index.mdx
The changelog already lists 3.2.0 for the dataCollection.userInfo change, but the spec_version field still said 3.1.0.
Defines which sensitive data the SDK scrubs and which data Relay scrubs. It also defines the terms and separates scrubbing from parameterization.
This follows our meeting discussion @mydea @Dav1dde
[Filtered]. The purpose decides which one applies?. If it does not do this, it may senddb.query.textdataCollectioninstead ofsendDefaultPii. Fixed outdated links.Tested (what do we see in Sentry)
JS app on SDK v11. Raw values set in span attributes with
beforeSendSpan:http.request.body.data,http.response.body.data,http.request.header.cookie,http.response.header.set-cookie,http.response.header.x-probe-*.passwordbecame[Filtered]as a whole.cart=[Filtered]).session=…) are scrubbed.connect.sidis not: Scrub theconnect.sidsession cookie relay#6497.