Skip to content

feat(node-core): Migrate sendDefaultPii to dataCollection#21100

Open
chargome wants to merge 1 commit into
chargome/datacollection-ref-corefrom
chargome/js-2503-node-core-datacollection
Open

feat(node-core): Migrate sendDefaultPii to dataCollection#21100
chargome wants to merge 1 commit into
chargome/datacollection-ref-corefrom
chargome/js-2503-node-core-datacollection

Conversation

@chargome
Copy link
Copy Markdown
Member

Migrate all three sendDefaultPii callsites in node-core to the new dataCollection client option:

  • systemError.ts: Use getDataCollectionOptions().userInfo to gate file paths in system error context
  • context.ts: Remove stale TODO — context data is technical context that should always be collected per spec
  • httpServerSpansIntegration.ts: Pass getDataCollectionOptions() directly to httpHeadersToSpanAttributes

closes #20931

Migrate all three `sendDefaultPii` callsites in node-core to the new
`dataCollection` client option:

- `systemError.ts`: Use `getDataCollectionOptions().userInfo` to gate
  file paths in system error context
- `context.ts`: Remove stale TODO — context data is technical context
  that should always be collected per spec
- `httpServerSpansIntegration.ts`: Pass `getDataCollectionOptions()`
  directly to `httpHeadersToSpanAttributes`

Refs GH-20931
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chargome chargome self-assigned this May 21, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 21, 2026

JS-2503

async function addContext(event: Event): Promise<Event> {
const updatedContext = _updateContext(await contextsPromise);

// TODO(v11): conditional with `sendDefaultPii` here?
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.29 kB added added
@sentry/browser - with treeshaking flags 25.71 kB added added
@sentry/browser (incl. Tracing) 45.29 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 47.52 kB added added
@sentry/browser (incl. Tracing, Profiling) 50.27 kB added added
@sentry/browser (incl. Tracing, Replay) 84.89 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.4 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 89.61 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 102.22 kB added added
@sentry/browser (incl. Feedback) 44.48 kB added added
@sentry/browser (incl. sendFeedback) 32.11 kB added added
@sentry/browser (incl. FeedbackAsync) 37.22 kB added added
@sentry/browser (incl. Metrics) 28.37 kB added added
@sentry/browser (incl. Logs) 28.5 kB added added
@sentry/browser (incl. Metrics & Logs) 29.21 kB added added
@sentry/react 29.03 kB added added
@sentry/react (incl. Tracing) 47.52 kB added added
@sentry/vue 32.22 kB added added
@sentry/vue (incl. Tracing) 47.15 kB added added
@sentry/svelte 27.32 kB added added
CDN Bundle 29.7 kB added added
CDN Bundle (incl. Tracing) 47.8 kB added added
CDN Bundle (incl. Logs, Metrics) 31.07 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 48.94 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 70.4 kB added added
CDN Bundle (incl. Tracing, Replay) 85.3 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.33 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.16 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.22 kB added added
CDN Bundle - uncompressed 87.73 kB added added
CDN Bundle (incl. Tracing) - uncompressed 144.21 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 91.93 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.67 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.65 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.98 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.43 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.68 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.12 kB added added
@sentry/nextjs (client) 50.01 kB added added
@sentry/sveltekit (client) 45.77 kB added added
@sentry/core/server 76.22 kB added added
@sentry/core/browser 62.99 kB added added
@sentry/node-core 62.85 kB added added
@sentry/node 165.01 kB added added
@sentry/node - without tracing 75.26 kB added added
@sentry/aws-serverless 87.44 kB added added
@sentry/cloudflare (withSentry) - minified 173.65 kB added added
@sentry/cloudflare (withSentry) 433.99 kB added added

@chargome
Copy link
Copy Markdown
Member Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit edcdf45. Configure here.

@chargome chargome marked this pull request as ready for review May 22, 2026 08:28
@chargome chargome requested a review from a team as a code owner May 22, 2026 08:28
@chargome chargome requested review from andreiborza, mydea and s1gr1d and removed request for a team May 22, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants