[skill-drift] fix(sentry-svelte-sdk): replace deprecated sendDefaultPii with dataCollection#162
Open
github-actions[bot] wants to merge 1 commit into
Conversation
…ii with dataCollection Automated drift-fix run. Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
Comment on lines
+157
to
+159
| dataCollection: { | ||
| userInfo: true, | ||
| }, |
There was a problem hiding this comment.
Bug: Replacing sendDefaultPii: true with dataCollection: { userInfo: true } is not equivalent for SDKs < 10.56.0, causing a silent loss of cookie and header data collection.
Severity: MEDIUM
Suggested Fix
To ensure consistent data collection across all supported SDK versions, update the dataCollection example to explicitly include cookies: true and httpHeaders: { request: true, response: true }. Alternatively, add a clear warning and separate examples for users on SDK versions older than 10.56.0.
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-svelte-sdk/SKILL.md#L157-L159
Potential issue: The documentation incorrectly suggests replacing `sendDefaultPii: true`
with `dataCollection: { userInfo: true }` as an equivalent change. This is only true for
`@sentry/sveltekit` SDK versions 10.56.0 and newer. For supported older versions (10.8.0
to 10.55.x), `sendDefaultPii: true` collected user info, cookies, and request headers.
The new configuration only collects user info because other `dataCollection` fields like
`cookies` and `httpHeaders` default to false in those versions. This results in a
silent, unintended loss of cookie and HTTP header data for users on these older SDKs who
follow the new examples.
Also affects:
skills/sentry-svelte-sdk/SKILL.md:174~176skills/sentry-svelte-sdk/SKILL.md:278~280skills/sentry-svelte-sdk/references/error-monitoring.md:28~31
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
sendDefaultPii: truewithdataCollection: { userInfo: true }in all code examplesdataCollectionAPI (userInfo, cookies, httpHeaders, httpBodies, queryParams)Context
PR #21277 deprecated
sendDefaultPiiin favor of the more granulardataCollectionAPI. The old option still works but will be removed in v11. The skill was teaching users a deprecated API pattern.Mapping:
sendDefaultPii: true→dataCollection: { userInfo: true }(equivalent behavior for the skill's use case)Related changes in SDK v10.56.0:
dataCollection.userInfonow defaults totruedataCollection.httpBodiesnow defaults to all body typesdataCollection.frameContextLinesused by ContextLines integrationFiles changed
skills/sentry-svelte-sdk/SKILL.md— 3 code examples + configuration tableskills/sentry-svelte-sdk/references/error-monitoring.md— 1 example + 2 best practicesskills/sentry-svelte-sdk/references/logging.md— 1 auto-attributes table entry🤖 Generated by skill-drift detector
Source PRs
sendDefaultPiiin favor ordataCollectiondataCollection.userInfototruedataCollection.httpBodiesto all valid body typesdataCollection.frameContextLinesfor ContextLines integration