Skip to content

feat(metrics): Migrate metrics to use dataCollection instead of sendDefaultPii#21078

Open
chargome wants to merge 1 commit into
developfrom
cg/datacollection-metrics
Open

feat(metrics): Migrate metrics to use dataCollection instead of sendDefaultPii#21078
chargome wants to merge 1 commit into
developfrom
cg/datacollection-metrics

Conversation

@chargome
Copy link
Copy Markdown
Member

@chargome chargome commented May 20, 2026

Migrates metrics code from reading sendDefaultPii off client options to using the new client.getDataCollectionOptions().userInfo API. This is a 1:1 behavioral mapping — userInfo controls the same auto-population of user identity fields (IP, User-Agent) that sendDefaultPii did.

closes #21051

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

@cursor review

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 b76c0da. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.32 kB +0.05% +12 B 🔺
@sentry/browser - with treeshaking flags 25.74 kB +0.05% +11 B 🔺
@sentry/browser (incl. Tracing) 45.33 kB +0.05% +21 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 47.56 kB +0.06% +25 B 🔺
@sentry/browser (incl. Tracing, Profiling) 50.31 kB +0.04% +18 B 🔺
@sentry/browser (incl. Tracing, Replay) 84.93 kB +0.03% +20 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.44 kB +0.03% +22 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 89.64 kB +0.03% +19 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 102.25 kB +0.03% +24 B 🔺
@sentry/browser (incl. Feedback) 44.51 kB +0.03% +11 B 🔺
@sentry/browser (incl. sendFeedback) 32.13 kB +0.05% +14 B 🔺
@sentry/browser (incl. FeedbackAsync) 37.25 kB +0.04% +12 B 🔺
@sentry/browser (incl. Metrics) 28.41 kB +0.05% +14 B 🔺
@sentry/browser (incl. Logs) 28.54 kB +0.05% +14 B 🔺
@sentry/browser (incl. Metrics & Logs) 29.24 kB +0.05% +12 B 🔺
@sentry/react 29.05 kB +0.04% +10 B 🔺
@sentry/react (incl. Tracing) 47.56 kB +0.05% +20 B 🔺
@sentry/vue 32.24 kB +0.04% +11 B 🔺
@sentry/vue (incl. Tracing) 47.19 kB +0.05% +20 B 🔺
@sentry/svelte 27.35 kB +0.05% +13 B 🔺
CDN Bundle 29.73 kB +0.05% +14 B 🔺
CDN Bundle (incl. Tracing) 47.85 kB +0.07% +32 B 🔺
CDN Bundle (incl. Logs, Metrics) 31.1 kB +0.05% +13 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 48.99 kB +0.07% +30 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 70.43 kB +0.02% +12 B 🔺
CDN Bundle (incl. Tracing, Replay) 85.35 kB +0.04% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.38 kB +0.03% +23 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 91.21 kB +0.03% +27 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.28 kB +0.05% +43 B 🔺
CDN Bundle - uncompressed 87.8 kB +0.03% +21 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 144.3 kB +0.04% +46 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 92 kB +0.03% +21 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.76 kB +0.04% +46 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.72 kB +0.01% +21 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 263.07 kB +0.02% +46 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.52 kB +0.02% +46 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.77 kB +0.02% +46 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.21 kB +0.02% +46 B 🔺
@sentry/nextjs (client) 50.04 kB +0.05% +22 B 🔺
@sentry/sveltekit (client) 45.81 kB +0.05% +21 B 🔺
@sentry/core/server 76.2 kB +0.03% +16 B 🔺
@sentry/core/browser 62.97 kB +0.02% +12 B 🔺
@sentry/node-core 62.57 kB +0.02% +12 B 🔺
@sentry/node 164.74 kB +0.01% +8 B 🔺
@sentry/node - without tracing 75.01 kB +0.02% +10 B 🔺
@sentry/aws-serverless 87.23 kB +0.02% +11 B 🔺
@sentry/cloudflare (withSentry) - minified 172.98 kB +0.02% +21 B 🔺
@sentry/cloudflare (withSentry) 432.15 kB +0.01% +14 B 🔺

View base workflow run

@chargome chargome marked this pull request as ready for review May 20, 2026 16:24
@chargome chargome requested a review from a team as a code owner May 20, 2026 16:24
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 metrics to dataCollection

1 participant