Skip to content

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

Merged
chargome merged 9 commits into
developfrom
chargome/js-2503-node-core-datacollection
May 28, 2026
Merged

feat(node-core): Migrate sendDefaultPii to dataCollection#21100
chargome merged 9 commits into
developfrom
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

chargome and others added 5 commits May 20, 2026 15:29
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

github-actions Bot commented May 21, 2026

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 27.16 kB - -
@sentry/browser - with treeshaking flags 25.61 kB - -
@sentry/browser (incl. Tracing) 45.24 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.47 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.22 kB - -
@sentry/browser (incl. Tracing, Replay) 84.82 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.39 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.52 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.15 kB - -
@sentry/browser (incl. Feedback) 44.33 kB - -
@sentry/browser (incl. sendFeedback) 31.98 kB - -
@sentry/browser (incl. FeedbackAsync) 37.07 kB - -
@sentry/browser (incl. Metrics) 28.24 kB - -
@sentry/browser (incl. Logs) 28.48 kB - -
@sentry/browser (incl. Metrics & Logs) 29.18 kB - -
@sentry/react 28.98 kB - -
@sentry/react (incl. Tracing) 47.51 kB - -
@sentry/vue 32.2 kB - -
@sentry/vue (incl. Tracing) 47.15 kB - -
@sentry/svelte 27.18 kB - -
CDN Bundle 29.54 kB - -
CDN Bundle (incl. Tracing) 47.8 kB - -
CDN Bundle (incl. Logs, Metrics) 31.04 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.04 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.3 kB - -
CDN Bundle (incl. Tracing, Replay) 85.18 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.05 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.21 kB - -
CDN Bundle - uncompressed 87.58 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.07 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.06 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.83 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.79 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.85 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.59 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.28 kB - -
@sentry/nextjs (client) 50.02 kB - -
@sentry/sveltekit (client) 45.67 kB - -
@sentry/core/server 75.93 kB - -
@sentry/core/browser 63.09 kB - -
@sentry/node-core 61.95 kB -0.02% -11 B 🔽
@sentry/node 130.38 kB -0.01% -11 B 🔽
@sentry/node - without tracing 74.36 kB +0.01% +3 B 🔺
@sentry/aws-serverless 86.56 kB -0.01% -7 B 🔽
@sentry/cloudflare (withSentry) - minified 171.5 kB - -
@sentry/cloudflare (withSentry) 429.29 kB - -

View base workflow run

@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
Comment thread packages/node-core/test/integrations/systemError.test.ts
Base automatically changed from chargome/datacollection-ref-core to develop May 28, 2026 09:47
@chargome chargome merged commit 0a4c0cb into develop May 28, 2026
541 of 548 checks passed
@chargome chargome deleted the chargome/js-2503-node-core-datacollection branch May 28, 2026 13:45
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.

(node-core): Migrate node-core to dataCollection

3 participants