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

    closesMigrate request data to dataCollection #21048

@chargomechargome self-assigned this May 20, 2026
@chargome

Copy link
Copy Markdown
MemberAuthor

@cursor review

Comment threadpackages/core/src/integrations/requestdata.ts
@github-actions

github-actionsBot commented May 20, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.27 kB--
@sentry/browser - with treeshaking flags25.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 flags74.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/react29.01 kB--
@sentry/react (incl. Tracing)47.5 kB--
@sentry/vue32.19 kB--
@sentry/vue (incl. Tracing)47.13 kB--
@sentry/svelte27.3 kB--
CDN Bundle29.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 - uncompressed87.69 kB--
CDN Bundle (incl. Tracing) - uncompressed144.18 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed92.18 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed147.94 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed216.91 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed262.96 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed266.7 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed276.66 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed280.39 kB--
@sentry/nextjs (client)49.99 kB--
@sentry/sveltekit (client)45.75 kB--
@sentry/core/server76.48 kB+0.06%+41 B 🔺
@sentry/core/browser63.22 kB+0.06%+32 B 🔺
@sentry/node-core62.84 kB+0.48%+294 B 🔺
@sentry/node131.32 kB+0.21%+264 B 🔺
@sentry/node - without tracing75.24 kB+0.36%+265 B 🔺
@sentry/aws-serverless87.43 kB+0.28%+236 B 🔺
@sentry/cloudflare (withSentry) - minified174.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
MemberAuthor

bugbot run

Comment threadpackages/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 ownerMay 21, 2026 09:51
@chargome
chargome requested review from andreiborza, mydea and s1gr1d and removed request for a teamMay 21, 2026 09:51
@chargome
chargomeforce-pushed the chargome/datacollection-ref-core branch 2 times, most recently from dd64c4b to 8249dd4CompareMay 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
MemberAuthor

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

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.

Migrate request data to dataCollection

2 participants

@chargome@s1gr1d