Skip to content

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

Merged
chargome merged 5 commits into
developfrom
chargome/datacollection-ref-core
May 28, 2026
Merged

feat(core): Migrate request data to dataCollection#21071
chargome merged 5 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.27 kB - -
@sentry/browser - with treeshaking flags 25.69 kB - -
@sentry/browser (incl. Tracing) 45.27 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.51 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.25 kB - -
@sentry/browser (incl. Tracing, Replay) 84.87 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.38 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.59 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.2 kB - -
@sentry/browser (incl. Feedback) 44.46 kB - -
@sentry/browser (incl. sendFeedback) 32.09 kB - -
@sentry/browser (incl. FeedbackAsync) 37.21 kB - -
@sentry/browser (incl. Metrics) 28.37 kB - -
@sentry/browser (incl. Logs) 28.59 kB - -
@sentry/browser (incl. Metrics & Logs) 29.29 kB - -
@sentry/react 29.01 kB - -
@sentry/react (incl. Tracing) 47.5 kB - -
@sentry/vue 32.19 kB - -
@sentry/vue (incl. Tracing) 47.13 kB - -
@sentry/svelte 27.3 kB - -
CDN Bundle 29.68 kB - -
CDN Bundle (incl. Tracing) 47.8 kB - -
CDN Bundle (incl. Logs, Metrics) 31.17 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.05 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.48 kB - -
CDN Bundle (incl. Tracing, Replay) 85.3 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.45 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.33 kB - -
CDN Bundle - uncompressed 87.69 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.18 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.18 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.94 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.91 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.96 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.7 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.66 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.39 kB - -
@sentry/nextjs (client) 49.99 kB - -
@sentry/sveltekit (client) 45.75 kB - -
@sentry/core/server 76.48 kB +0.06% +41 B 🔺
@sentry/core/browser 63.22 kB +0.06% +32 B 🔺
@sentry/node-core 62.84 kB +0.48% +294 B 🔺
@sentry/node 131.32 kB +0.21% +264 B 🔺
@sentry/node - without tracing 75.24 kB +0.36% +265 B 🔺
@sentry/aws-serverless 87.43 kB +0.28% +236 B 🔺
@sentry/cloudflare (withSentry) - minified 174.16 kB +0.45% +763 B 🔺
@sentry/cloudflare (withSentry) 435.35 kB +0.47% +2.02 kB 🔺

View base workflow run

@chargome
Copy link
Copy Markdown
Member Author

bugbot run

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
@chargome chargome force-pushed the chargome/datacollection-ref-core branch 2 times, most recently from dd64c4b to 8249dd4 Compare May 21, 2026 13:42
Object.entries(headers).forEach(([key, value]) => {
const regularHeaders: Record<string, string> = {};

for (const [key, value] of Object.entries(headers)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Q: Just wondering why forEach was changed to for .. of

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.

just for consistency within the file

@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 2eab6f7. Configure here.

@chargome chargome merged commit f55fc30 into develop May 28, 2026
264 of 265 checks passed
@chargome chargome deleted the chargome/datacollection-ref-core branch May 28, 2026 09:47
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

2 participants