[skill-drift] update(sentry-nestjs-sdk): document dataCollection API replacing sendDefaultPii#151
Open
github-actions[bot] wants to merge 1 commit into
Conversation
…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 | |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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