Skip to content

feat(core): Migrate request data to dataCollection#21071

Open
chargome wants to merge 4 commits into
developfrom
chargome/datacollection-ref-core
Open

feat(core): Migrate request data to dataCollection#21071
chargome wants to merge 4 commits into
developfrom
chargome/datacollection-ref-core

Conversation

@chargome
Copy link
Copy Markdown
Member

  • httpHeadersToSpanAttributes() now accepts ResolvedDataCollection and delegates filtering
    to filterKeyValueData() from the data-collection utils instead of reimplementing deny/allow logic.
    Boolean (sendDefaultPii) is still accepted for backward compat with external callers (TODO for v11 removal).

  • requestDataIntegration reads client.getDataCollectionOptions() instead of client.getOptions().sendDefaultPii.
    DEFAULT_INCLUDE is now derived from dataCollection at call time, with integration-level include options
    overriding per spec.

  • server-subscription.ts passes client.getDataCollectionOptions() to header attribute creation

    closes Migrate request data to dataCollection #21048

@chargome chargome self-assigned this May 20, 2026
@chargome
Copy link
Copy Markdown
Member Author

@cursor review

Comment thread packages/core/src/integrations/requestdata.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.31 kB - -
@sentry/browser - with treeshaking flags 25.73 kB - -
@sentry/browser (incl. Tracing) 45.31 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.53 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.29 kB - -
@sentry/browser (incl. Tracing, Replay) 84.91 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.42 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.63 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.23 kB - -
@sentry/browser (incl. Feedback) 44.5 kB - -
@sentry/browser (incl. sendFeedback) 32.12 kB - -
@sentry/browser (incl. FeedbackAsync) 37.24 kB - -
@sentry/browser (incl. Metrics) 28.39 kB - -
@sentry/browser (incl. Logs) 28.62 kB - -
@sentry/browser (incl. Metrics & Logs) 29.32 kB - -
@sentry/react 29.04 kB - -
@sentry/react (incl. Tracing) 47.54 kB - -
@sentry/vue 32.23 kB - -
@sentry/vue (incl. Tracing) 47.16 kB - -
@sentry/svelte 27.34 kB - -
CDN Bundle 29.71 kB - -
CDN Bundle (incl. Tracing) 47.82 kB - -
CDN Bundle (incl. Logs, Metrics) 31.2 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.07 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.52 kB - -
CDN Bundle (incl. Tracing, Replay) 85.32 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.48 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.33 kB - -
CDN Bundle - uncompressed 87.78 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.01 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 217 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 263.03 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.73 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.46 kB - -
@sentry/nextjs (client) 50.02 kB - -
@sentry/sveltekit (client) 45.79 kB - -
@sentry/core/server 76.35 kB +0.08% +58 B 🔺
@sentry/core/browser 63.11 kB +0.08% +48 B 🔺
@sentry/node-core 62.88 kB +0.51% +313 B 🔺
@sentry/node 164.63 kB +0.19% +312 B 🔺
@sentry/node - without tracing 75.28 kB +0.38% +278 B 🔺
@sentry/aws-serverless 87.47 kB +0.29% +249 B 🔺
@sentry/cloudflare (withSentry) - minified 173.72 kB +0.45% +763 B 🔺
@sentry/cloudflare (withSentry) 434.15 kB +0.47% +2.02 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c1eac5b. Configure here.

Comment thread packages/core/test/lib/integrations/requestdata.test.ts
@chargome chargome marked this pull request as ready for review May 21, 2026 09:51
@chargome chargome requested a review from a team as a code owner May 21, 2026 09:51
@chargome chargome requested review from andreiborza, mydea and s1gr1d and removed request for a team May 21, 2026 09:51
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.

Migrate request data to dataCollection

1 participant