Skip to content

docs(javascript): Document dataCollection option#17986

Open
s1gr1d wants to merge 6 commits into
masterfrom
sig/dataCollection-option
Open

docs(javascript): Document dataCollection option#17986
s1gr1d wants to merge 6 commits into
masterfrom
sig/dataCollection-option

Conversation

@s1gr1d
Copy link
Copy Markdown
Member

@s1gr1d s1gr1d commented Jun 2, 2026

DESCRIBE YOUR PR

Merge after this is released: getsentry/sentry-javascript#21277

closes getsentry/sentry-javascript#20939

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@s1gr1d s1gr1d requested a review from inventarSarah June 2, 2026 11:37
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jun 5, 2026 12:01pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jun 5, 2026 12:01pm

Request Review

@s1gr1d s1gr1d requested review from chargome and cleptric June 2, 2026 11:37
Comment thread docs/platforms/javascript/common/configuration/options.mdx Outdated
@cleptric
Copy link
Copy Markdown
Member

cleptric commented Jun 2, 2026

Should also add this to https://docs.sentry.io/platforms/javascript/data-management/

Copy link
Copy Markdown
Collaborator

@inventarSarah inventarSarah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content looks good to me 👍

Will updating the other pages that mention sendDefaultPi be covered in a separate PR?
Let me know if I can support you with that.

Comment thread docs/platforms/javascript/common/data-management/data-collected/index.mdx Outdated
@s1gr1d
Copy link
Copy Markdown
Member Author

s1gr1d commented Jun 3, 2026

I updated the "Data Collected" page as well now: https://sentry-docs-git-sig-datacollection-option.sentry.dev/platforms/javascript/guides/nextjs/data-management/data-collected/

I also changed all code snippets that contained sendDefaultPii - so users don't get a deprecation warning when they paste the snippet.

Comment thread docs/platforms/javascript/common/data-management/data-collected/index.mdx Outdated
Comment thread docs/platforms/javascript/common/data-management/data-collected/index.mdx Outdated

You can control many of the categories listed here with the <PlatformLink to="/configuration/options/#dataCollection">`dataCollection` option</PlatformLink>, which lets you opt in or out of each data category individually. The <PlatformLink to="/configuration/options/#sendDefaultPii">`sendDefaultPii` option</PlatformLink> is still supported, but deprecated as of version `10.54.0`.

How much the SDK collects by default depends on which option you use. Without `dataCollection` (and with `sendDefaultPii` unset or `false`), the SDK collects conservatively, and the defaults described on this page apply. As soon as you pass a `dataCollection` object, the categories you don't set explicitly fall back to their `dataCollection` defaults, which are more permissive. For example, cookies, query parameters (with sensitive values scrubbed), and AI message content are then collected unless you opt out. Setting `sendDefaultPii: true` is equivalent to enabling all `dataCollection` categories. If both are set, `sendDefaultPii` is ignored.
Copy link
Copy Markdown
Contributor

@coolguyzone coolguyzone Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
How much the SDK collects by default depends on which option you use. Without `dataCollection` (and with `sendDefaultPii` unset or `false`), the SDK collects conservatively, and the defaults described on this page apply. As soon as you pass a `dataCollection` object, the categories you don't set explicitly fall back to their `dataCollection` defaults, which are more permissive. For example, cookies, query parameters (with sensitive values scrubbed), and AI message content are then collected unless you opt out. Setting `sendDefaultPii: true` is equivalent to enabling all `dataCollection` categories. If both are set, `sendDefaultPii` is ignored.
How much data the SDK collects by default depends on which option you use. Without `dataCollection` (and with `sendDefaultPii` unset or `false`), the SDK collects conservatively, and the defaults described on this page apply. As soon as you pass a `dataCollection` object, the categories you don't set explicitly fall back to their `dataCollection` defaults, which are more permissive. For example, cookies, query parameters (with sensitive values scrubbed), and AI message content is then collected unless you opt out. Setting `sendDefaultPii: true` is equivalent to enabling all `dataCollection` categories. If both are set, `sendDefaultPii` is ignored.

Copy link
Copy Markdown
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🏄‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update user docs for dataCollection

4 participants