Skip to content

feat(android): [Data Collection 23] Add manifest configuration - #6038

Draft
adinauer wants to merge 1 commit into
feat/data-collection-external-optionsfrom
feat/data-collection-android-manifest
Draft

feat(android): [Data Collection 23] Add manifest configuration#6038
adinauer wants to merge 1 commit into
feat/data-collection-external-optionsfrom
feat/data-collection-android-manifest

Conversation

@adinauer

@adinauer adinauer commented Sep 2, 2026

Copy link
Copy Markdown
Member

PR Stack (Data Collection)


📜 Description

Parse flattened Data Collection settings from Android manifest metadata.

Support user information, HTTP body directions, cookies, request and response headers, URL query parameters, GraphQL document and variables, and database query data. Apply only metadata fields that are present, preserving existing programmatic configuration and the unconfigured legacy state when the namespace is absent. Partial key-value settings preserve the existing mode or terms that were not specified.

Expose the internal DataCollection constructor and explicit-configuration check so Android can parse metadata into an unconfigured temporary object before merging it transactionally.

💡 Motivation and Context

Android applications commonly configure the SDK through AndroidManifest.xml. Data Collection needs equivalent manifest support without replacing settings supplied through other configuration layers or accidentally opting legacy applications into the new defaults.

Refs #5666

💚 How did you test it?

  • ./gradlew :sentry:test --tests '*DataCollectionTest'
  • ./gradlew :sentry-android-core:testDebugUnitTest --tests '*ManifestMetadataReaderTest'
  • ./gradlew :sentry-android-core: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 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 metadata while preserving existing option values for fields omitted from the manifest. Expose internal configuration-state helpers across SDK modules so Android can distinguish absent metadata from explicit settings.\n\nRefs #5666\nCo-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 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 2, 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 e549730

@sentry

sentry Bot commented Sep 2, 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

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 297.55 ms 374.40 ms 76.85 ms
Size 0 B 0 B 0 B

Baseline results on branch: feat/data-collection-external-options

Startup times

Revision Plain With Sentry Diff
d3db9cd 322.28 ms 378.68 ms 56.40 ms

App size

Revision Plain With Sentry Diff
d3db9cd 0 B 0 B 0 B

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