Skip to content

[skill-drift] update(sentry-nestjs-sdk): document dataCollection API replacing sendDefaultPii#151

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
skill-drift/sentry-nestjs-sdk-skill-drift-update-sentry-nestjs-sdk-doc-1780325425
Open

[skill-drift] update(sentry-nestjs-sdk): document dataCollection API replacing sendDefaultPii#151
github-actions[bot] wants to merge 1 commit into
mainfrom
skill-drift/sentry-nestjs-sdk-skill-drift-update-sentry-nestjs-sdk-doc-1780325425

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 1, 2026

Warning

Auto-generated from external SDK content. Review all links and code suggestions before acting on them.

Summary

  • Updated Sentry.init() examples to use new dataCollection API (SDK ≥ 10.54.0)
  • Added dataCollection configuration options to the reference table
  • Marked sendDefaultPii as deprecated in favor of dataCollection.userInfo
  • Updated config-driven init example to use dataCollection

Context

The Sentry JavaScript SDK introduced a new dataCollection client option in v10.54.0 (PR #20965) as a centralized, fine-grained way to control data collection. The simple sendDefaultPii boolean option will be deprecated and removed in a future release.

Recent migrations to dataCollection that affect NestJS:

  • PR #21100: Migrated @sentry/node-core (merged May 28, 2026)
  • PR #21071: Migrated core request data collection (merged May 28, 2026)

Changes Made

  1. Init examples (lines 158-174, 185-195): Replaced sendDefaultPii: true with the new dataCollection object showing:

    • userInfo: true (replaces sendDefaultPii for user context/IP)
    • httpHeaders control for request/response headers
    • cookies and queryParams collection options
    • Added comment noting sendDefaultPii is deprecated
  2. Configuration table (lines 489-519):

    • Added dataCollection and its sub-options
    • Marked sendDefaultPii as Deprecated
    • Added defaults note for httpHeaders and genAI
  3. Config example reference (line 198): Updated comment to mention dataCollection instead of sendDefaultPii

Reviewed PRs

All PRs merged within the 7-day window (cutoff: 2026-05-25)

Primary drift source:

  • PR #21100feat(node-core): Migrate sendDefaultPii to dataCollection (May 28, 2026)
  • PR #21071feat(core): Migrate request data to dataCollection (May 28, 2026)

Related migrations (inform broader ecosystem shift):

Why this matters for NestJS:
NestJS SDK inherits from @sentry/node and @sentry/node-core. The node-core migration makes dataCollection the recommended API for all Node.js-based SDKs, including NestJS.

🤖 Generated with Claude Code skill-drift detection

Source PRs

…replacing sendDefaultPii

Automated drift-fix run.

Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
Comment on lines +514 to +515
| `dataCollection.cookies` | `boolean\|object` | `true` | Capture cookies; use `{allow: [...]}` or `{deny: [...]}` for filtering |
| `dataCollection.queryParams` | `boolean\|object` | `true` | Capture URL query parameters; use `{allow: [...]}` or `{deny: [...]}` for filtering |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The documentation for dataCollection options like cookies, queryParams, and httpHeaders incorrectly states their type is boolean and default is true, contradicting the Sentry SDK specification.
Severity: MEDIUM

Suggested Fix

Update the SKILL.md documentation to reflect the correct types and default values for dataCollection options as per the Sentry SDK specification. The type should be KeyValueCollectionBehavior ({mode: "off"|"denyList"|"allowList", terms?: string[]}) and the default should be { mode: "denyList" } for cookies, queryParams, httpHeaders.request, and httpHeaders.response.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills/sentry-nestjs-sdk/SKILL.md#L514-L515

Potential issue: The documentation for `dataCollection` options incorrectly specifies
the type and default values for several fields. Specifically, `cookies`, `queryParams`,
`httpHeaders.request`, and `httpHeaders.response` are documented as accepting a boolean
`true` and defaulting to it. However, the Sentry SDK specification defines these fields
as `KeyValueCollectionBehavior` objects, with a default of `{ mode: "denyList" }`. AI
agents using this documentation will generate invalid configurations (e.g., `cookies:
true`), potentially leading to misconfigured data collection or runtime errors in the
user's application.

Also affects:

  • skills/sentry-nestjs-sdk/SKILL.md:532~534

Did we get this right? 👍 / 👎 to inform future reviews.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants