Title: Remove `sendDefaultPii` in v9 · Issue #6160 · getsentry/sentry-java · GitHub
Open Graph Title: Remove `sendDefaultPii` in v9 · Issue #6160 · getsentry/sentry-java
X Title: Remove `sendDefaultPii` in v9 · Issue #6160 · getsentry/sentry-java
Description: Description Remove the deprecated sendDefaultPii option from the Java and Android SDKs in version 9. Data Collection becomes the only SDK-level control for data collected automatically by supported integrations. sendDefaultPii was deprec...
Open Graph Description: Description Remove the deprecated sendDefaultPii option from the Java and Android SDKs in version 9. Data Collection becomes the only SDK-level control for data collected automatically by supported...
X Description: Description Remove the deprecated sendDefaultPii option from the Java and Android SDKs in version 9. Data Collection becomes the only SDK-level control for data collected automatically by supported...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/6160
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove `sendDefaultPii` in v9","articleBody":"## Description\n\nRemove the deprecated `sendDefaultPii` option from the Java and Android SDKs in version 9. Data Collection becomes the only SDK-level control for data collected automatically by supported integrations.\n\n`sendDefaultPii` was deprecated in 8.x after `dataCollection` shipped. The SDK and documentation warn that it will be removed in v9. This issue tracks the complete removal so no legacy configuration surface, fallback behavior, sample, or active documentation remains.\n\n## SDK work\n\n- Remove `SentryOptions.isSendDefaultPii()`, `setSendDefaultPii(...)`, and the backing field.\n- Remove the corresponding `ExternalOptions` property and merge behavior.\n- Remove all configuration keys:\n - `send-default-pii` / `SENTRY_SEND_DEFAULT_PII`\n - Spring Boot `sentry.send-default-pii`\n - Android manifest `io.sentry.send-default-pii`\n - `@EnableSentry(sendDefaultPii = ...)` in Spring, Spring Jakarta, and Spring 7\n- Remove the v8 compatibility bridge from `DataCollectionResolver`. When Data Collection isn't explicitly configured, use the v9 Data Collection defaults instead of legacy `sendDefaultPii` behavior.\n- Remove remaining direct reads, deprecation suppressions, and fallback-specific code from integrations and utilities.\n- Replace the remaining compatibility exceptions:\n - Logback must use `includeUnencodedMessage` exclusively for original templates and parameters.\n - Decide and implement the v9 behavior for OpenTelemetry-derived sensitive HTTP headers, which still depend on `sendDefaultPii` in v8.\n- Update Java/Android/Spring samples to use Data Collection or the narrower integration-specific option.\n- Regenerate API dumps and remove the deleted public API entries.\n- Update and add tests for v9 defaults, removed configuration surfaces, and integration behavior.\n- Add the breaking change and migration guidance to `CHANGELOG.md` and the v8-to-v9 migration documentation.\n\n## Documentation work\n\nIn `getsentry/sentry-docs`:\n\n- Remove the Java and Android `sendDefaultPii` option entries from current v9 documentation.\n- Remove active Java/Android references that direct users to or describe fallback behavior for `sendDefaultPii`.\n- Document Data Collection as the sole replacement, including the behavior change when no Data Collection fields are configured.\n- Document the Logback and OpenTelemetry migration outcomes.\n- Keep historical migration and versioned v8 documentation accurate rather than rewriting old behavior.\n- Audit downstream wrapper documentation separately where the wrapper still exposes the legacy option.\n\n## Acceptance criteria\n\n- A production-code search finds no `sendDefaultPii`, `isSendDefaultPii`, `send-default-pii`, or `SEND_DEFAULT_PII` compatibility path in the v9 SDK.\n- Current Java and Android samples and documentation no longer configure or recommend the removed option.\n- The v8-to-v9 migration guide explains how to preserve restrictive v8 behavior with explicit Data Collection settings.\n- Data Collection defaults and every former compatibility exception have explicit test coverage.\n\nRelated:\n- Data Collection implementation: #5759\n- Deprecation: #6158\n- Initial Data Collection docs: getsentry/sentry-docs#19401\n- Removal warning docs: getsentry/sentry-docs#19598\n","author":{"url":"https://github.com/adinauer","@type":"Person","name":"adinauer"},"datePublished":"2026-09-24T04:31:17Z","url":"https://github.com/getsentry/sentry-java/issues/6160"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6420e7ef-7d17-21be-362e-3736b1ff3d05 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB08:27A224:5EFCB9:807E76:6B04415E |
| html-safe-nonce | 1f5a64a8dbf63c34d26d60b936df527e5e93fcc176868ffd67f9a40e3bd8a4e4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjA4OjI3QTIyNDo1RUZDQjk6ODA3RTc2OjZCMDQ0MTVFIiwidmlzaXRvcl9pZCI6IjE5MTYzNDg4NjgwNjk3MDQwMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 144dee7af2cf2a695bdba39b536251493754d71ed86471bc3bfe5bc63974204f |
| hovercard-subject-tag | issue:5563168932 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/6160/issue_layout |
| twitter:image | https://opengraph.githubassets.com/132ca0b2ce1ce3fde98e02f9c2f6701575d5a32d94e42cd1dee78b86c241e146/getsentry/sentry-java/issues/6160 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/132ca0b2ce1ce3fde98e02f9c2f6701575d5a32d94e42cd1dee78b86c241e146/getsentry/sentry-java/issues/6160 |
| og:image:alt | Description Remove the deprecated sendDefaultPii option from the Java and Android SDKs in version 9. Data Collection becomes the only SDK-level control for data collected automatically by supported... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adinauer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width