Skip to content

feat(android): [Logs and Metrics Enable Flags 13] Warn for legacy Metrics metadata - #5954

Open
adinauer wants to merge 3 commits into
feat/remove-metrics-enable-flagfrom
feat/warn-legacy-metrics-manifest
Open

feat(android): [Logs and Metrics Enable Flags 13] Warn for legacy Metrics metadata#5954
adinauer wants to merge 3 commits into
feat/remove-metrics-enable-flagfrom
feat/warn-legacy-metrics-manifest

Conversation

@adinauer

@adinauer adinauer commented Aug 13, 2026

Copy link
Copy Markdown
Member

PR Stack (Logs and Metrics Enable Flags)


📜 Description

Detects explicit legacy io.sentry.metrics.enabled Android manifest metadata and emits tailored migration warnings for both true and false values.

The obsolete metadata value is not applied. Manual Sentry.metrics() capture remains active regardless of the configured value, and absent metadata emits no warning.

💡 Motivation and Context

The aggregate Metrics enable option was removed in the previous PR. Existing Android applications may still configure its manifest key, so a focused warning helps users remove stale configuration without restoring the old behavior.

💚 How did you test it?

  • ./gradlew :sentry-android-core:testReleaseUnitTest
  • ./gradlew spotlessApply apiDump
  • Added tests for absent, explicit true, and explicit false metadata
  • Verified both explicit values leave manual Metrics capture active

📝 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 a migration warning for legacy external metrics.enabled configuration.

#skip-changelog

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

Detect explicit io.sentry.metrics.enabled manifest values and emit tailored migration warnings without applying the obsolete option.

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

github-actions Bot commented Aug 13, 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 281f533

@sentry

sentry Bot commented Aug 13, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

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