Skip to content

ref(core)!: [Remove sendDefaultPii 1] Remove sendDefaultPii - #6793

Merged
adinauer merged 6 commits into
9.x.xfrom
ref/remove-send-default-pii-v9
Nov 30, 2026
Merged

adinauer merged 6 commits into
9.x.xfrom
ref/remove-send-default-pii-v9

Conversation

@adinauer

@adinauer adinauer commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Remove sendDefaultPii)


📜 Description

Remove the deprecated sendDefaultPii option from the Java, Android, Spring, external configuration, and generated API surfaces. Data Collection is now the only SDK-level control for automatically collected data.

When Data Collection is not explicitly configured, the documented defaults now apply directly: user information, database query data, file paths, GraphQL content, and HTTP bodies are enabled, while cookies, URL query parameters, and HTTP headers use their default deny lists. Explicit Data Collection settings continue to take precedence.

This also removes the compatibility-only DataCollection.forceDataCollection() API, makes Logback rely only on includeUnencodedMessage, and applies the request-header Data Collection policy to OpenTelemetry-derived headers.

💡 Motivation and Context

sendDefaultPii was deprecated in 8.x after Data Collection shipped. Version 9 removes the legacy configuration surfaces and fallback behavior so integrations use one consistent policy model.

Migration guidance documents the new defaults and how to configure restrictive collection behavior explicitly.

💚 How did you test it?

  • Ran affected core, Android, Apollo, GraphQL, Ktor, Logback, OkHttp, OpenTelemetry, Servlet, Spring, and Spring Boot tests.
  • Ran make format api.
  • Ran Spotless and Detekt checks.
  • Verified no active legacy option or compatibility-path references remain.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

  • Update the v9 Java and Android option documentation in sentry-docs.
  • Audit downstream wrappers that still expose sendDefaultPii.

⚠️ Merge #6799 into this branch with a merge commit before squash-merging this PR into 9.x.x.

@linear-code

linear-code Bot commented Nov 26, 2026

Copy link
Copy Markdown

JAVA-744

@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: high

For commit 1e2ebc7.

Main concerns: public contract, reach, data sent to Sentry.

Rules that block low also fired:

  • R1: code was truncated, omitted or a reduced context was used: sentry-apollo-5/src/main/java/io/sentry/apollo5/SentryApollo5HttpInterceptor.kt, sentry-apollo-5/src/main/java/io/sentry/apollo5/SentryApollo5Interceptor.kt, sentry-apollo-5/src/test/java/io/sentry/apollo5/SentryApollo5BuilderExtensionsClientErrorsTest.kt, sentry-apollo/src/main/java/io/sentry/apollo/SentryApolloInterceptor.kt, sentry-graphql-core/src/main/java/io/sentry/graphql/ExceptionReporter.java and 102 more
  • R4: a public API record changed: sentry-spring-7/api/sentry-spring-7.api, sentry-spring-jakarta/api/sentry-spring-jakarta.api, sentry-spring/api/sentry-spring.api, sentry/api/sentry.api

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.66.0 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: high PR risk score: high labels Nov 26, 2026
@adinauer
adinauer marked this pull request as ready for review November 27, 2026 03:56
@adinauer
adinauer requested a review from a team as a code owner November 27, 2026 03:56
@adinauer
adinauer requested review from 0xadam-brown and romtsn and removed request for a team November 27, 2026 03:56
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: high PR risk score: high labels Nov 27, 2026

@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.

Stale Bugbot comment from a previous run.

Remove the deprecated option and use Data Collection defaults across SDK integrations. Document how to configure restrictive collection behavior when migrating to version 9.

Fixes GH-6160
New JDK trust stores reject the compromised eMudhra certificate during the TLS handshake before the SDK-specific check runs. Assert the shared IOException contract so the transport test remains valid across JDK trust store versions.
@adinauer
adinauer force-pushed the ref/remove-send-default-pii-v9 branch from b6c577c to c642802 Compare November 27, 2026 10:24
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: high PR risk score: high labels Nov 27, 2026

@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.

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

There are 2 total unresolved issues (including 1 from previous review).

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

@adinauer adinauer changed the title ref(core)!: Remove sendDefaultPii ref(core)!: [Remove sendDefaultPii 1] Remove sendDefaultPii Nov 27, 2026

@romtsn romtsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd check the bugbot finding and also the couple of comments I've left, let me know when it needs another look!

Keep completed OpenTelemetry HTTP header attributes outside Data Collection because the SDK cannot distinguish manual attributes from automatic instrumentation. Continue filtering known security cookies and document the v9 behavior.

Refs GH-6160

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: high PR risk score: high labels Nov 30, 2026
Keep the remove-sendDefaultPii stack focused on the SDK and changelog. Version migration guidance is maintained in the platform documentation instead of the obsolete root migration file.

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: high PR risk score: high labels Nov 30, 2026
@adinauer
adinauer merged commit a72cfed into 9.x.x Nov 30, 2026
42 of 43 checks passed
@adinauer
adinauer deleted the ref/remove-send-default-pii-v9 branch November 30, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants