Skip to content

[skill-drift] update(sentry-node-sdk): document new dataCollection option #152

Description

@github-actions

Warning

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

cc @getsentry/docs

Summary

The Node.js SDK is migrating from the boolean sendDefaultPii option to a new, granular dataCollection object. The skill currently documents only sendDefaultPii and needs comprehensive updates across multiple sections.

What Changed

PR #20965 (2026-05-18) introduced the dataCollection client option per the SDK spec. Multiple follow-up PRs have migrated various subsystems:

  • PR #21100: Node-core request handling
  • PR #21247: AI integrations (OpenAI, Anthropic, LangChain, etc.)
  • PR #21261: Bun/Deno request instrumentation
  • PR #21217: Framework middleware (Astro, Nuxt, SvelteKit)

New API Structure

dataCollection: {
  userInfo: boolean,           // IP addresses, user identifiers
  cookies: boolean,            // Cookie headers
  httpHeaders: { request: boolean, response: boolean },
  httpBodies: string[],        // HTTP methods to capture bodies for
  queryParams: boolean,        // URL query parameters
  genAI: { inputs: boolean, outputs: boolean },  // AI prompts & responses
  stackFrameVariables: boolean,
  frameContextLines: number,
}

Precedence: explicit integration options > dataCollection > sendDefaultPii (fallback) > false

Skill Sections Needing Updates

  1. Init examples (lines 172-206, 386-397, 484-499) — all show sendDefaultPii: true; should demonstrate dataCollection with explanation of granular controls
  2. Config reference table (line 739) — add dataCollection row with link to spec; note sendDefaultPii is now a legacy fallback
  3. AI monitoring recommendations (lines 112, 126, 655) — mention dataCollection.genAI as preferred over sendDefaultPii for AI integrations
  4. Cross-reference — the sentry-setup-ai-monitoring skill also needs updating (out of scope for this issue)

Why Manual Review Required

  • Affects 10+ code examples and configuration tables
  • Migration guidance and backward-compatibility notes need careful wording
  • Official spec (linked above) should be reviewed for accuracy
  • Ongoing migration effort — docs may still be evolving
  • Related skills affected: sentry-setup-ai-monitoring, sentry-bun-sdk, sentry-deno-sdk

Reviewed PRs

  • #20965 — feat(core): Add dataCollection client option
  • #21100 — feat(node-core): Migrate sendDefaultPii to dataCollection
  • #21247 — feat(node): Migrate Node AI provider to dataCollection option
  • #21261 — feat(bun, deno): Migrate request instrumentation to dataCollection
  • #21217 — feat: Migrate sendDefaultPii in nitro, nuxt, sveltekit, astro to dataCollection

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions