Repository navigation
[skill-drift] update(sentry-nestjs-sdk): document dataCollection API replacing sendDefaultPii - #151
Conversation
…replacing sendDefaultPii Automated drift-fix run. Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…stjs-sdk-skill-drift-update-sentry-nestjs-sdk-doc-1780325425
…-nestjs-sdk-doc-1780325425' of github.com:getsentry/sentry-for-ai into skill-drift/sentry-nestjs-sdk-skill-drift-update-sentry-nestjs-sdk-doc-1780325425
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| | `dataCollection` | `object` | See below | Controls what data the SDK collects (SDK ≥ 10.57.0) | | ||
| | `dataCollection.userInfo` | `boolean` | `true` | Include IP addresses and user context | | ||
| | `dataCollection.httpHeaders` | `object` | See below | Capture HTTP headers for requests/responses | | ||
| | `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 | | ||
| | `dataCollection.genAI` | `object` | See below | Control AI input/output recording | |
There was a problem hiding this comment.
Bug: The dataCollection reference table in SKILL.md omits the httpBodies option, even though it's documented elsewhere in the file and is a key PII control feature.
Severity: MEDIUM
Suggested Fix
Add a row to the dataCollection reference table for the httpBodies option, similar to the one present in the browser SDK's SKILL.md. The row should specify its type, default value (["incomingRequest", "outgoingRequest", "incomingResponse", "outgoingResponse"]), and a description of its purpose.
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#L506-L511
Potential issue: The reference table for the `dataCollection` option in the NestJS SDK
documentation (`SKILL.md`) is missing an entry for `dataCollection.httpBodies`. This
option is referenced in commented-out code examples and is explicitly documented in the
defaults section below the table. This omission means developers relying on the
reference table will be unaware of the primary mechanism for controlling HTTP body
collection, which is a significant feature for managing personally identifiable
information (PII).
| release: process.env.SENTRY_RELEASE, | ||
| sendDefaultPii: true, | ||
|
|
||
| // Data collection (SDK ≥ 10.57.0 — replaces deprecated sendDefaultPii) |
There was a problem hiding this comment.
Bug: The NestJS SKILL.md incorrectly documents the minimum SDK version for dataCollection as 10.57.0 instead of the correct 10.54.0, causing user confusion.
Severity: MEDIUM
Suggested Fix
Update the minimum SDK version for dataCollection in the NestJS SKILL.md from 10.57.0 to 10.54.0 in all relevant places (e.g., the section heading and code example comments) to match the actual release version and other documentation.
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#L163
Potential issue: The NestJS `SKILL.md` documentation specifies that the `dataCollection`
feature requires SDK version `≥ 10.57.0`. This contradicts the PR description and the
browser SDK documentation, which both state the feature was introduced in `v10.54.0`.
This inconsistency will cause developers using SDK versions between 10.54.0 and 10.56.x
to incorrectly believe they cannot use the `dataCollection` feature.
| | `environment` | `string` | `"production"` | e.g., `"staging"`; env: `SENTRY_ENVIRONMENT` | | ||
| | `release` | `string` | — | e.g., `"myapp@1.0.0"`; env: `SENTRY_RELEASE` | | ||
| | `dataCollection` | `object` | See below | Controls what data the SDK collects (SDK ≥ 10.57.0) | | ||
| | `dataCollection.userInfo` | `boolean` | `true` | Include IP addresses and user context | |
There was a problem hiding this comment.
Bug: The documentation for dataCollection.userInfo in the NestJS SKILL.md states a default of true, contradicting the browser SDK's documentation which states false.
Severity: HIGH
Suggested Fix
Verify the actual default value of dataCollection.userInfo in the SDK. Update the NestJS SKILL.md documentation to reflect the correct default value, ensuring it is consistent with the browser SDK documentation and the SDK's behavior to avoid confusion regarding PII collection.
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#L507
Potential issue: The NestJS `SKILL.md` documents the default value for
`dataCollection.userInfo` as `true`, which directly contradicts the browser SDK
documentation where the default is `false`. If the actual default is `false` (consistent
with the historical behavior of `sendDefaultPii: false`), this documentation error could
lead developers to either unknowingly fail to collect user data or mistakenly believe no
action is needed for privacy compliance, creating a risk related to PII handling.
Warning
Auto-generated from external SDK content. Review all links and code suggestions before acting on them.
Summary
Sentry.init()examples to use newdataCollectionAPI (SDK ≥ 10.54.0)dataCollectionconfiguration options to the reference tablesendDefaultPiias deprecated in favor ofdataCollection.userInfodataCollectionContext
The Sentry JavaScript SDK introduced a new
dataCollectionclient option in v10.54.0 (PR #20965) as a centralized, fine-grained way to control data collection. The simplesendDefaultPiiboolean option will be deprecated and removed in a future release.Recent migrations to
dataCollectionthat affect NestJS:@sentry/node-core(merged May 28, 2026)Changes Made
Init examples (lines 158-174, 185-195): Replaced
sendDefaultPii: truewith the newdataCollectionobject showing:userInfo: true(replacessendDefaultPiifor user context/IP)httpHeaderscontrol for request/response headerscookiesandqueryParamscollection optionssendDefaultPiiis deprecatedConfiguration table (lines 489-519):
dataCollectionand its sub-optionssendDefaultPiias DeprecatedhttpHeadersandgenAIConfig example reference (line 198): Updated comment to mention
dataCollectioninstead ofsendDefaultPiiReviewed PRs
All PRs merged within the 7-day window (cutoff: 2026-05-25)
Primary drift source:
feat(node-core): Migrate sendDefaultPii to dataCollection(May 28, 2026)feat(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/nodeand@sentry/node-core. The node-core migration makesdataCollectionthe recommended API for all Node.js-based SDKs, including NestJS.🤖 Generated with Claude Code skill-drift detection
Source PRs
sendDefaultPiitodataCollectiondataCollectiondataCollectionoptionsendDefaultPiitodataCollectiondataCollectionsendDefaultPiiin nitro, nuxt, sveltekit, astro todataCollectiondataCollection