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

chargomeand 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>
@chargomechargome self-assigned this May 21, 2026
@linear-code

Copy link
Copy Markdown

JS-2503

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

// TODO(v11): conditional with `sendDefaultPii` here?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@github-actions

github-actionsBot commented May 21, 2026

Copy link
Copy Markdown
Contributor

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.

PathSize% ChangeChange
@sentry/browser27.16 kB--
@sentry/browser - with treeshaking flags25.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 flags74.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/react28.98 kB--
@sentry/react (incl. Tracing)47.51 kB--
@sentry/vue32.2 kB--
@sentry/vue (incl. Tracing)47.15 kB--
@sentry/svelte27.18 kB--
CDN Bundle29.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 - uncompressed87.58 kB--
CDN Bundle (incl. Tracing) - uncompressed144.07 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed92.06 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed147.83 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed216.79 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed262.85 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed266.59 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed276.55 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed280.28 kB--
@sentry/nextjs (client)50.02 kB--
@sentry/sveltekit (client)45.67 kB--
@sentry/core/server75.93 kB--
@sentry/core/browser63.09 kB--
@sentry/node-core61.95 kB-0.02%-11 B 🔽
@sentry/node130.38 kB-0.01%-11 B 🔽
@sentry/node - without tracing74.36 kB+0.01%+3 B 🔺
@sentry/aws-serverless86.56 kB-0.01%-7 B 🔽
@sentry/cloudflare (withSentry) - minified171.5 kB--
@sentry/cloudflare (withSentry)429.29 kB--

View base workflow run

@chargome

Copy link
Copy Markdown
MemberAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

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 ownerMay 22, 2026 08:28
@chargome
chargome requested review from andreiborza, mydea and s1gr1d and removed request for a teamMay 22, 2026 08:28
Comment threadpackages/node-core/test/integrations/systemError.test.ts
Base automatically changed from chargome/datacollection-ref-core to developMay 28, 2026 09:47
@chargome
chargome merged commit 0a4c0cb into developMay 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 freeto 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

@chargome@JPeer264@s1gr1d