Skip to content

feat(core): [Data Collection 22] Add external configuration - #6036

Draft
adinauer wants to merge 1 commit into
fix/data-collection-opentelemetry-span-descriptionfrom
feat/data-collection-external-options
Draft

feat(core): [Data Collection 22] Add external configuration#6036
adinauer wants to merge 1 commit into
fix/data-collection-opentelemetry-span-descriptionfrom
feat/data-collection-external-options

Conversation

@adinauer

@adinauer adinauer commented Sep 1, 2026

Copy link
Copy Markdown
Member

PR Stack (Data Collection)


📜 Description

Parse flattened Data Collection settings through ExternalOptions, making them available from sentry.properties, Java system properties, and environment variables.

Support user information, HTTP body directions, cookies, request and response headers, URL query parameters, GraphQL document and variables, and database query data. Merge only configured fields into SentryOptions; omitted fields retain their documented defaults or legacy behavior. An empty data-collection.http-bodies value disables all body directions.

💡 Motivation and Context

Data Collection was previously configurable only through the programmatic SentryOptions API and framework-specific binding. JVM applications that rely on the SDK's external configuration need equivalent access without custom initialization code.

Explicit external Data Collection configuration takes precedence over sendDefaultPii, matching the programmatic resolver behavior.

Refs #5666

💚 How did you test it?

  • ./gradlew :sentry:test --tests 'io.sentry.ExternalOptionsTest' --tests 'io.sentry.SentryOptionsTest'
  • ./gradlew :sentry:check
  • ./gradlew spotlessApply apiDump
  • git diff --check

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

🔮 Next steps

Add Spring Boot binding coverage, Android manifest metadata support, and Data Collection configuration documentation in follow-up PRs.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

Parse flattened Data Collection settings from properties, system properties, and environment variables. Merge only configured values so omitted settings retain their documented or legacy behavior.

Refs #5666
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against a3ab073

@sentry

sentry Bot commented Sep 1, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

This was referenced Sep 1, 2026
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.

1 participant