Update migration notes for sendDefaultPii in SDK - #19340
Conversation
Added migration details for `sendDefaultPii` behavior in data collection options, clarifying backfill conditions and implications for SDKs.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Please update the IS YOUR CHANGE URGENT? section of the PR description:
This information helps the Docs team prioritize your review. |
| }); | ||
| ``` | ||
|
|
||
| If the SDK can not cleanly map `sendDefaultPii` behavior to data collection options, it **MUST NOT** backfill data collection options from the configured `sendDefaultPii` value. Instead the SDK **MUST** ignore the value of `sendDefaultPii` if any data collection options is set explicitly and instead use the default data collection options where no explicit value has been set. |
There was a problem hiding this comment.
Put this as MUST NOT on purpose without mentioning that in theory it's possible to start backfilling in a major. Even with a major, we'd implicitly be forcing our customers to switch to data collection and re-evaluate what data the SDK sends. The way this is worded means customers can keep using sendDefaultPii without being bothered by data collection.
| - **`sendDefaultPii: true`** (legacy) → omit `dataCollection` entirely; the new defaults already populate `user.*` and collect HTTP bodies. Add overrides only to restrict collection. | ||
| - **`sendDefaultPii: false`** (legacy) → opt out of the categories the new defaults collect. | ||
|
|
||
| The new defaults collect **more data** than either legacy setting did. User identity, generative AI content, HTTP request/response bodies, and file paths are now on by default, and more HTTP headers and cookies are collected. This config restricts collection to roughly match the previous behavior of `sendDefaultPii: false`: |
There was a problem hiding this comment.
The docs here are meant as directions for users so we have a shared agreement on how to document the changes. E.g. when someone set sendDefaultPii: true, users can omit dataCollection entirely as the new defaults have this behavior.
With the new sentence above ("if the SDK..."), those instructions now read as backfill rules for the SDKs (which they are not meant to be).
So far, we don't have explicit guidance in the spec on how to do the migration within the SDKs. But I agree that it's worth to add them. Or at least make this section clearer on what it actually communicates.
For example:
- Previous **`sendDefaultPii: true`** → users can omit `dataCollection` entirely; the new defaults already populate `user.*` and collect HTTP bodies. Add overrides only to restrict collection.
- Previous **`sendDefaultPii: false`** → users should opt out of the categories the new defaults collect.And the first sentence could be grouped together with the rest of the instructions that are meant for SDKs. It makes a lot of sense to add docs for what an SDK must do when the old sendDefaultPii does not map 1:1 onto dataCollection.
| If the SDK can not cleanly map `sendDefaultPii` behavior to data collection options, it **MUST NOT** backfill data collection options from the configured `sendDefaultPii` value. Instead the SDK **MUST** ignore the value of `sendDefaultPii` if any data collection options is set explicitly and instead use the default data collection options where no explicit value has been set. | ||
| This prevents breaking changes in PII filtering and allows customers to migrate to data collection at their own pace. Customers may keep using `sendDefaultPii` without changes to SDK behavior as long as they don't opt into data collection. |
There was a problem hiding this comment.
I think this is pretty hard to read as the sentences are very long.
| If the SDK can not cleanly map `sendDefaultPii` behavior to data collection options, it **MUST NOT** backfill data collection options from the configured `sendDefaultPii` value. Instead the SDK **MUST** ignore the value of `sendDefaultPii` if any data collection options is set explicitly and instead use the default data collection options where no explicit value has been set. | |
| This prevents breaking changes in PII filtering and allows customers to migrate to data collection at their own pace. Customers may keep using `sendDefaultPii` without changes to SDK behavior as long as they don't opt into data collection. | |
| If the SDK cannot cleanly map the `sendDefaultPii` behavior to data collection options, it **MUST NOT** derive data collection options from the configured `sendDefaultPii` value. Instead, the following rules apply: | |
| - if the user sets at least one data collection option, the SDK **MUST** ignore `sendDefaultPii`. The SDK **MUST** apply the options the user set, and the spec defaults for all other options. [This also means that the SDK might send more data when `sendDefaultPii` was `false` before, so users should be made aware of that.] <-- we should probably explicitly add this sentece | |
| - If the user sets no data collection options, the SDK **MUST** keep the legacy `sendDefaultPii` behavior unchanged. | |
| This prevents breaking changes in PII filtering and allows customers to migrate to data collection at their own pace. Customers may keep using `sendDefaultPii` without changes to SDK behavior as long as they don't opt into data collection. |
Added migration details for
sendDefaultPiibehavior in data collection options, clarifying backfill conditions and implications for SDKs.DESCRIBE YOUR PR
Tell us what you're changing and why. If your PR resolves an issue, please link it so it closes automatically.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES