Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion develop-docs/sdk/foundations/client/data-collection/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
title: Data Collection
description: Configuration for what data SDKs collect by default, including technical context, PII, and sensitive data.
spec_id: sdk/foundations/client/data-collection
spec_version: 0.3.0
spec_version: 0.4.0
spec_status: candidate
spec_depends_on:
- id: sdk/foundations/client
version: ">=1.0.0"
spec_changelog:
- version: 0.4.0
date: 2026-06-12
summary: Added documentation requirements for default behavior and setup snippet opt-out comment with link to full dataCollection docs.
- version: 0.3.0
date: 2026-06-05
summary: Promoted to candidate following the initial JavaScript SDK implementation. Version stays `0.x` until the contract is frozen at `stable`.
Expand Down Expand Up @@ -106,6 +109,26 @@ The three sensitivity levels determine whether data is collected by default:
- **PII Data**: SDKs **SHOULD** automatically populate user identity fields (`user.*`) by default. Users can set the `userInfo` option to `false` to opt out. See [`dataCollection` Options](#datacollection-options).
- **Sensitive Data**: SDKs **MUST** never send sensitive values through automatic instrumentation. Values for keys matching the denylist **MUST** be replaced with `"[Filtered]"`; key names are always retained. Users can use `beforeSend` (or equivalent) to remove or redact keys if needed. See [Sensitive Denylist](#sensitive-denylist).

SDK documentation **MUST** document the default value and behavior of each `dataCollection` option.

</SpecSection>

<SpecSection id="setup-snippet-opt-out" status="candidate" since="0.4.0">

### Setup Snippet Opt-Out Comment

All SDK initialization code snippets (including documentation examples, onboarding flows, and CLI wizard output) **MUST** include a commented-out `dataCollection` override that disables `userInfo` and `httpBodies`.
The comment **MUST** include a URL linking to the full `dataCollection` documentation matching the specific platform or guide.

```pseudocode
init({
dsn: "...",
// To disable sending user data and HTTP bodies, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/configuration/options/#dataCollection
// dataCollection: { userInfo: false, httpBodies: [] },
})
```

</SpecSection>

<SpecSection id="sensitive-denylist" status="candidate" since="0.1.0">
Expand Down
Loading