Skip to content

feat(core)!: Enable data collection by default (based on spec) - #22917

Merged
chargome merged 10 commits into
developfrom
sig/collect-data-based-on-spec
Aug 3, 2026
Merged

feat(core)!: Enable data collection by default (based on spec)#22917
chargome merged 10 commits into
developfrom
sig/collect-data-based-on-spec

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Jul 31, 2026

Copy link
Copy Markdown
Member

First merge this PR (is merged): #22913

Enable the dataCollection specification defaults when neither dataCollection nor the legacy sendDefaultPii option is configured.

Tests and development test applications now rely on the new defaults instead of redundantly opting into userInfo and related data.

closes #22707

@s1gr1d
s1gr1d requested review from a team as code owners July 31, 2026 12:28
@s1gr1d
s1gr1d requested review from andreiborza, chargome, isaacs, logaretm and msonnb and removed request for a team July 31, 2026 12:28
@s1gr1d
s1gr1d marked this pull request as draft July 31, 2026 12:28
Base automatically changed from sig/remove-sendDefaultPii-unit-test to develop July 31, 2026 12:31
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.91 kB +0.02% +5 B 🔺
@sentry/browser - with treeshaking flags 28.12 kB +0.02% +4 B 🔺
@sentry/browser (incl. Tracing) 47.36 kB +0.02% +5 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 47.36 kB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Profiling) 52.13 kB +0.01% +5 B 🔺
@sentry/browser (incl. Tracing, Replay) 86.7 kB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.13 kB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 91.41 kB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 104.05 kB +0.01% +5 B 🔺
@sentry/browser (incl. Feedback) 47.22 kB +0.02% +5 B 🔺
@sentry/browser (incl. sendFeedback) 34.76 kB +0.02% +5 B 🔺
@sentry/browser (incl. FeedbackAsync) 39.87 kB +0.02% +6 B 🔺
@sentry/browser (incl. Metrics) 30.99 kB +0.02% +5 B 🔺
@sentry/browser (incl. Logs) 31.22 kB +0.02% +4 B 🔺
@sentry/browser (incl. Metrics & Logs) 31.9 kB +0.02% +4 B 🔺
@sentry/react 31.73 kB +0.02% +5 B 🔺
@sentry/react (incl. Tracing) 49.61 kB +0.01% +4 B 🔺
@sentry/vue 34.98 kB +0.03% +7 B 🔺
@sentry/vue (incl. Tracing) 49.34 kB +0.02% +5 B 🔺
@sentry/svelte 29.94 kB +0.02% +5 B 🔺
CDN Bundle 32.01 kB +0.02% +6 B 🔺
CDN Bundle (incl. Tracing) 47.72 kB +0.02% +6 B 🔺
CDN Bundle (incl. Logs, Metrics) 33.55 kB +0.02% +4 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 49.08 kB +0.02% +7 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 72.9 kB +0.01% +5 B 🔺
CDN Bundle (incl. Tracing, Replay) 85.35 kB +0.01% +7 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.65 kB +0.01% +7 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 91.14 kB +0.01% +5 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.46 kB +0.01% +7 B 🔺
CDN Bundle - uncompressed 95.52 kB +0.03% +24 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 143.1 kB +0.02% +24 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.23 kB +0.03% +24 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.08 kB +0.02% +24 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.99 kB +0.02% +24 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.36 kB +0.01% +24 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.33 kB +0.01% +24 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.07 kB +0.01% +24 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.02 kB +0.01% +24 B 🔺
@sentry/nextjs (client) 52.21 kB +0.01% +4 B 🔺
@sentry/sveltekit (client) 47.81 kB +0.02% +8 B 🔺
@sentry/core/server 80.01 kB +0.02% +9 B 🔺
@sentry/core/browser 51.97 kB +0.02% +9 B 🔺
@sentry/node 120.89 kB +0.01% +7 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 84.26 kB +0.01% +5 B 🔺
@sentry/aws-serverless 92.94 kB +0.02% +17 B 🔺
@sentry/cloudflare (withSentry) - minified 219.37 kB +0.02% +24 B 🔺
@sentry/cloudflare (withSentry) 540.47 kB +0.01% +34 B 🔺

View base workflow run

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.

# Conflicts:
#	packages/browser/test/client.test.ts
#	packages/browser/test/integrations/httpclient.test.ts
#	packages/core/test/lib/integrations/supabase.test.ts
#	packages/core/test/lib/logs/internal.test.ts
#	packages/core/test/lib/metrics/internal.test.ts
#	packages/core/test/lib/tracing/spans/captureSpan.test.ts
#	packages/core/test/lib/tracing/spans/envelope.test.ts
#	packages/core/test/lib/utils/data-collection/resolveDataCollectionOptions.test.ts
#	packages/core/test/lib/utils/request.test.ts
#	packages/deno/test/deno-serve.test.ts
@s1gr1d

s1gr1d commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

@BugBot run

@s1gr1d s1gr1d changed the title feat(core): Enable data collection by default (based on spec) feat(core)!: Enable data collection by default (based on spec) Jul 31, 2026
chargome and others added 3 commits August 3, 2026 13:18
…tTag test

The script tag line following the button varies by test variant: CDN bundle
runs inject additional `cdn.bundle.js` and `contextlines.bundle.js` tags on
that line, so a hardcoded literal only matches the tarball build and fails in
every bundle job.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
With `dataCollection.userInfo` defaulting to true, the Hono middleware now
attaches the client IP via `setUser()`. The envelope matcher compares events
strictly, and the runner silently discards non-matching envelopes in unordered
mode, so the missing key surfaced as a test timeout rather than an assertion
failure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
With `dataCollection.databaseQueryData` defaulting to true, Supabase breadcrumbs
now carry a `data.query` payload. The breadcrumb assertions compare objects
exactly, so the added key made them fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chargome chargome self-assigned this Aug 3, 2026
@chargome

chargome commented Aug 3, 2026

Copy link
Copy Markdown
Member

buglitzer moch

@cursor cursor Bot 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 5c73912. Configure here.

@chargome
chargome marked this pull request as ready for review August 3, 2026 13:22
@chargome
chargome requested a review from a team as a code owner August 3, 2026 13:22
@chargome
chargome requested review from nicohrubec and removed request for a team August 3, 2026 13:22

@chargome chargome left a comment

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.

expect(client.getOptions()._metadata?.sdk?.settings?.infer_ip).toBe('never');
});

it('sets infer_ip to "never" if dataCollection.userInfo is false', () => {

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.

m: should we not keep these to test the case where users explicitly opt out?

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.

Good call, but these are covered already

@chargome
chargome merged commit cabb4ab into develop Aug 3, 2026
516 of 518 checks passed
@chargome
chargome deleted the sig/collect-data-based-on-spec branch August 3, 2026 15:34
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.

[v11] Switch dataCollection.userInfo default

3 participants