feat(android): [Data Collection 23] Add manifest configuration - #6038
feat(android): [Data Collection 23] Add manifest configuration#6038adinauer wants to merge 3 commits into
Conversation
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>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
|
📲 Install BuildsAndroid
|
Performance metrics 🚀
|
…ollection-android-manifest
Merge the conflict-resolved cookie policy through the remaining stacked branches. Co-Authored-By: Claude <noreply@anthropic.com>
runningcode
left a comment
There was a problem hiding this comment.
hey sorry to block, but i think we need to rebase (see my note) before we can proceed with the review.
|
|
||
| public final class io/sentry/DataCollection { | ||
| public fun <init> ()V | ||
| public fun <init> (Z)V |
There was a problem hiding this comment.
weird, there's only one constructor. this makes it seem like there are two
| } | ||
| } | ||
|
|
||
| private static @Nullable DataCollection readDataCollection( |
There was a problem hiding this comment.
@romtsn recently refactored all the methods in this class that read from the manifest in order to allow a performance improvement from the Gradle side. PR link It looks like the changes aren't in this PR. Can you see if a rebase fixes that? Without a rebase it is likely this code would crash when run together with the Gradle plugin.
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
DataCollectionconstructor 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 apiDumpgit diff --check📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Add Spring Boot binding coverage and Data Collection configuration documentation in follow-up PRs.
#skip-changelog