Skip to content

docs(java): Document Data Collection controls - #19401

Draft
adinauer wants to merge 28 commits into
masterfrom
docs/java-android-data-collection
Draft

adinauer wants to merge 28 commits into
masterfrom
docs/java-android-data-collection

Conversation

@adinauer

Copy link
Copy Markdown
Member

Document the Java and Android Data Collection controls planned for SDK 8.57.0.

This explains the new defaults, migration behavior from sendDefaultPii, built-in filtering, and configuration through code, properties, environment variables, Spring Boot, and Android manifest metadata. It also documents support across HTTP, GraphQL, Apollo, OkHttp, Ktor, OpenFeign, and File I/O integrations.

Update onboarding examples to opt into Data Collection with userInfo=false, matching the privacy-conscious JavaScript setup without adding unnecessary body configuration. Update Logback setup to load SDK options from sentry.properties and document the scoped includeUnencodedMessage control.

The documentation was checked against the cumulative sentry-java implementation rather than the original plan. databaseQueryData remains undocumented until a production integration consumes it.

Related implementation: getsentry/sentry-java#5759
Refs getsentry/sentry-java#5666

adinauer and others added 8 commits September 14, 2026 13:46
Replace sendDefaultPii guidance with granular Data Collection options across Java and Android documentation. Document defaults, migration behavior, integration coverage, and onboarding configuration.

Co-Authored-By: Claude <noreply@anthropic.com>
Document the default-enabled filePaths control across Java and Android
configuration surfaces. Correct migration and File I/O guidance so it matches
the cumulative SDK implementation.

Prefer Logback's scoped includeUnencodedMessage option instead of retaining the
broad legacy PII switch.

Co-Authored-By: Claude <noreply@anthropic.com>
Remove databaseQueryData from the Java and Android documentation while no
production integration consumes it. Document the option when an integration
can provide concrete configuration behavior.

Co-Authored-By: Claude <noreply@anthropic.com>
Preserve the existing sendDefaultPii descriptions while marking the option as legacy.

Align the Data Collected pages with current defaults and filtering behavior.

Co-Authored-By: Claude <noreply@anthropic.com>
Restore pre-existing formatting changed during the Data Collection update.

Keep quote, wrapping, XML, and snippet changes out of the branch diff.

Co-Authored-By: Claude <noreply@anthropic.com>
Add comments after userInfo examples in Java setup snippets.

Make it clear that developers can configure other collection categories.

Co-Authored-By: Claude <noreply@anthropic.com>
Set Data Collection availability to 8.57.0 and clarify that enabling it ignores the legacy sendDefaultPii option.

Co-Authored-By: Claude <noreply@anthropic.com>
Explain how key-value collection behavior maps to code and external settings. Link header controls to option details and limit Spring Boot properties to its guide.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Sep 18, 2026 1:42pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Sep 18, 2026 1:42pm UTC

Request Review

@github-actions github-actions Bot added the Priority: Needs Triage The PR description is missing valid priority information label Sep 14, 2026
@codeowner-assignment
codeowner-assignment Bot requested review from a team September 14, 2026 11:48
<meta-data
android:name="io.sentry.data-collection.user-info"
android:value="false" />
<meta-data

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

does the incoming_request make sense here? Android should only have outgoing, correct?

Comment thread docs/platforms/java/common/configuration/options.mdx Outdated
Comment thread docs/platforms/android/configuration/options.mdx
| Field | Type | Default | Behavior |
| ------------------------ | ---------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `userInfo` | `boolean` | `true` | Allows integrations to populate user identity and IP address information. |
| `cookies`\* | `KeyValueCollectionBehavior` | `DENY_LIST` | Collects cookies and filters sensitive values. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

KeyValueCollectionBehavior API is not listed/explained. Should there be a separate section to explain the usage and meaning of off(), allowList(...), denyList(...), setMode(), and setTerms?

Comment thread docs/platforms/android/manual-setup/index.mdx Outdated
Comment thread docs/platforms/android/data-management/data-collected.mdx Outdated
Comment thread docs/platforms/android/data-management/sensitive-data/index.mdx Outdated
Comment thread docs/platforms/java/common/data-management/sensitive-data/index.mdx Outdated
Comment thread docs/platforms/java/common/configuration/options.mdx Outdated
Comment thread docs/platforms/java/common/data-management/data-collected.mdx Outdated
Comment thread docs/platforms/java/common/configuration/options.mdx Outdated
adinauer and others added 12 commits September 16, 2026 09:40
Use the client-side request and response directions supported by Android
integrations in the manifest example.

Co-Authored-By: Claude <noreply@anthropic.com>
Document the complete built-in key-name term list so customers know which
cookie, header, and query parameter values are filtered by default.

Co-Authored-By: Claude <noreply@anthropic.com>
Warn that Data Collection does not automatically cover every header omitted
by legacy filtering and document the extended identifying-data deny terms.

Co-Authored-By: Claude <noreply@anthropic.com>
Show the public factory method for each key-value collection mode so users
can translate the documented behavior directly into Java or Kotlin code.

Co-Authored-By: Claude <noreply@anthropic.com>
Remove Java-style semicolons from the Kotlin initialization example and
restore Prettier formatting in the manual setup page.

Co-Authored-By: Claude <noreply@anthropic.com>
Explain that general HTTP header controls do not expose cookie values and
point readers to the separate cookie Data Collection setting.

Co-Authored-By: Claude <noreply@anthropic.com>
Distinguish sensitive header handling from URL and query string collection
when OpenTelemetry attributes are mapped to Sentry requests.

Co-Authored-By: Claude <noreply@anthropic.com>
Update the Kotlin manual setup example to modify the Data Collection object
loaded from manifest metadata instead of replacing it.

Co-Authored-By: Claude <noreply@anthropic.com>
Update the Java manual setup example to modify the Data Collection object
loaded from manifest metadata instead of replacing it.

Co-Authored-By: Claude <noreply@anthropic.com>
Identify the callbacks used to filter breadcrumbs, events, and Sentry Logs
when Data Collection does not control their content.

Co-Authored-By: Claude <noreply@anthropic.com>
Identify the callbacks used to filter breadcrumbs, events, and Sentry Logs
when Data Collection does not control their content.

Co-Authored-By: Claude <noreply@anthropic.com>
Stop claiming that Data Collection controls database query data because no
Android integration currently applies that option.

Co-Authored-By: Claude <noreply@anthropic.com>
adinauer and others added 4 commits September 16, 2026 12:38
Stop claiming that Data Collection controls database query data because no
Java integration currently applies that option.

Co-Authored-By: Claude <noreply@anthropic.com>
Point Data Collection property users to the external configuration setup
required for plain Java applications.

Co-Authored-By: Claude <noreply@anthropic.com>
List the integrations that collect body content and distinguish content
controls from body-size metadata.

Co-Authored-By: Claude <noreply@anthropic.com>
Explain how Spring and Spring Boot apply both Data Collection body directions
and maxRequestBodySize without implying that the limit affects other bodies.

Co-Authored-By: Claude <noreply@anthropic.com>
adinauer and others added 2 commits September 16, 2026 15:41
Replace constructor-based Data Collection setup with forceDataCollection()
and update migration guidance for the explicit opt-in API.

Co-Authored-By: Claude <noreply@anthropic.com>
Mark Data Collection as available in 8.58.0 for Java and Android.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread docs/platforms/android/manual-setup/index.mdx
Comment thread docs/platforms/android/configuration/options.mdx Outdated
Explain that Data Collection sends HTTP headers when migrating from sendDefaultPii=false.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Needs Triage The PR description is missing valid priority information

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants