Remove `sendDefaultPii` in v9
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
调研方向
The work spans multiple SDK modules (Java, Android, Spring). Start by searching the codebase for 'sendDefaultPii' and related configuration keys to locate all removal points. Review the DataCollectionResolver and integration-specific fallback code. Update tests to verify v9 defaults and removed configuration surfaces. The migration guide in CHANGELOG.md and documentation updates in the sentry-docs repository are also required.
由索引模型根据 Issue 内容生成。
描述
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 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.
SDK work
- Remove
SentryOptions.isSendDefaultPii(),setSendDefaultPii(...), and the backing field. - Remove the corresponding
ExternalOptionsproperty and merge behavior. - Remove all configuration keys:
send-default-pii/SENTRY_SEND_DEFAULT_PII- Spring Boot
sentry.send-default-pii - Android manifest
io.sentry.send-default-pii @EnableSentry(sendDefaultPii = ...)in Spring, Spring Jakarta, and Spring 7
- Remove the v8 compatibility bridge from
DataCollectionResolver. When Data Collection isn't explicitly configured, use the v9 Data Collection defaults instead of legacysendDefaultPiibehavior. - Remove remaining direct reads, deprecation suppressions, and fallback-specific code from integrations and utilities.
- Replace the remaining compatibility exceptions:
- Logback must use
includeUnencodedMessageexclusively for original templates and parameters. - Decide and implement the v9 behavior for OpenTelemetry-derived sensitive HTTP headers, which still depend on
sendDefaultPiiin v8.
- Logback must use
- Update Java/Android/Spring samples to use Data Collection or the narrower integration-specific option.
- Regenerate API dumps and remove the deleted public API entries.
- Update and add tests for v9 defaults, removed configuration surfaces, and integration behavior.
- Add the breaking change and migration guidance to
CHANGELOG.mdand the v8-to-v9 migration documentation.
Documentation work
In getsentry/sentry-docs:
- Remove the Java and Android
sendDefaultPiioption entries from current v9 documentation. - Remove active Java/Android references that direct users to or describe fallback behavior for
sendDefaultPii. - Document Data Collection as the sole replacement, including the behavior change when no Data Collection fields are configured.
- Document the Logback and OpenTelemetry migration outcomes.
- Keep historical migration and versioned v8 documentation accurate rather than rewriting old behavior.
- Audit downstream wrapper documentation separately where the wrapper still exposes the legacy option.
Acceptance criteria
- A production-code search finds no
sendDefaultPii,isSendDefaultPii,send-default-pii, orSEND_DEFAULT_PIIcompatibility path in the v9 SDK. - Current Java and Android samples and documentation no longer configure or recommend the removed option.
- The v8-to-v9 migration guide explains how to preserve restrictive v8 behavior with explicit Data Collection settings.
- Data Collection defaults and every former compatibility exception have explicit test coverage.
Related:
- Data Collection implementation: #5759
- Deprecation: #6158
- Initial Data Collection docs: getsentry/sentry-docs#19401
- Removal warning docs: getsentry/sentry-docs#19598
- 主要语言
- Kotlin
- 星标
- 1.4k
- 派生
- 478
- 平均合并
- 2 天 20 小时
- 30 天内合并 PR
- 71
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-java 的其他 Issue
-
Improvement Java Platform: Android Platform: Java
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/sentry-java#6145 · 1 条评论 · 已指派 1 人 ·
-
Bug Java Platform: Android Platform: Java
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-java#6138 · 1 条评论 ·
-
Feature Java Platform: Java Spans
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/sentry-java#5984 · 1 条评论 ·
-
Android Task Traces
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/sentry-java#5376 · 1 条评论 ·
-
Android Docs Errors
难度 2/5 1-3 小时 新手友好度 64/100
getsentry/sentry-java#5375 · 1 条评论 ·
查看 getsentry/sentry-java 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
AAswordman/Operit#1265 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
acristescu/OnlineGo#216 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
libre-tube/LibreTube#8803 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
status: waiting-for-triage type: bug
难度 2/5 1-3 小时 新手友好度 65/100
spring-projects/spring-security#19781 ·