Repository navigation
feat(telemetry): audit Sentry data and add safe memory diagnostics - #1213
Merged
Merged
Conversation
…tics Use a crash-only core SDK with event/envelope output allowlists, sanitized bounded retry cache, consent-safe startup/revocation, and no personal payloads or raw heaps. Add a consent-scoped numeric memory history and rate-limited high-memory warnings. Keep noSentry SDK-free and preserve release symbolication. Closes #859 Refs COLUMBA-EE This adds evidence for heap-pressure investigation; it does not claim to fix the underlying COLUMBA-EE exhaustion. Verified serialized SDK and real loopback HTTP payloads, consent interruptions, cache boundaries, release APK contents, and targeted consumer tests.
Contributor
[Medium impact] The PR appears safe to merge; the interrupted opt-out fix prevents revoked reports from replaying after restart. SummaryThe PR limits Sentry reports to approved crash details and bounded memory counts.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opts out] --> B[Save denial and cleanup requirement together]
B --> C[Stop reporting and clear memory samples]
C --> D[Delete pending SDK reports]
E[Restart or later opt-in] --> F{Cleanup required?}
F -->|Yes| D
D --> G{Deletion succeeded?}
G -->|No| H[Keep reporting disabled]
G -->|Yes| I[Clear cleanup requirement]
I --> J[Enable only with consent]
F -->|No| J
Reviews (2) · Last reviewed commit: "fix(telemetry): persist revoked-cache cl..." · Reviewed by Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Atomically journal pending SDK cache cleanup with durable consent denial. Preserve the journal through later grants and finish deletion before SDK initialization or replay. Clear it only after private and legacy cache cleanup succeeds. Reproduced the interrupted-shutdown, restart, delayed-startup and new-grant race with a failing regression. Verify it now deletes revoked envelopes before SDK creation while unrevoked same-build envelopes still replay. Sentry privacy, memory, consent and existing onboarding/settings tests pass; Sentry source/test ktlint and app detekt pass.
torlando-tech
added a commit
that referenced
this pull request
Oct 22, 2026
Resolve conflicts from 29 main commits (Sentry memory diagnostics #1213, unverified-sender warning #876, migration dispatcher #1205, Kotlin 2.4.21 toolchain, ktlint 14.2.0, and dependabot bumps): - CrashReportingPage/AdvancedCard/OptInDialog: take main's new crash_reporting_privacy_description + crash_reporting_title (the text changed to describe the new memory-diagnostics feature); drop the now -unused onboarding_crash_*/settings_advanced_crash_*/settings_crash_optin_body extractions this branch had added for the old wording. - MigrationImporter: keep main's MemoryDiagnostics try/finally wrapper and re-apply the UiMessage.Text extraction to the two ImportResult.Error sites inside it (Error now carries a UiMessage). - ImageCompressionPreset: keep displayNameRes + main's #1209 8K-cap comment. - strings.xml: union of both sides' additions. - New main UI strings (#876 unverified-sender chip + signature card) extracted to resources so NoHardcodedUiString stays green. Verified: :app:detekt, compile, resources, ktlint, :detekt-rules:test green; affected unit tests green except 5 pre-existing AdvancedCardTest transportNodeToggle flakes (pass in CI's noSentry variant).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #859.
Combines the existing Sentry privacy audit with bounded, privacy-minimized memory diagnostics for investigating COLUMBA-EE. This adds diagnostic evidence; it does not claim to reproduce or fix EE's underlying heap exhaustion.
Audit and outgoing policy
The previous Android SDK configuration enabled automatic tracing/profiling, UI/system/logcat breadcrumbs, and unrestricted exception messages without a central output allowlist.
sentryflavor only.Consent and memory diagnostics
Verification
assembleSentryKotlinBackendRelease,assembleNoSentryKotlinBackendReleaseandassembleSentryKotlinBackendDebugsucceed. Release APKs were built unsigned locally without release credentials or a live DSN.io.sentryclasses, no Sentry native/JAR entries; its release runtime dependency graph has noio.sentrydependency.io.sentry.androidclasses. Packaged ProGuard UUID asset verified.Deliberate limits
SECURITY.mddocuments the audit, allowlist, consent behavior and limits; CI now runs Sentry-flavor privacy tests rather than only shared no-Sentry tests.Refs COLUMBA-EE