feat(app): crash reporting via Sentry (vendor-neutral)#12
feat(app): crash reporting via Sentry (vendor-neutral)#12fabiodalez-dev wants to merge 1 commit into
Conversation
Production crash/ANR diagnostics — the app had none. Integrated manually (cleaner, reviewable diff than the wizard; no example-error crash injected). - Sentry Android Gradle plugin (io.sentry.android.gradle 4.14.1): auto-installs the SDK and, on release, uploads the R8 mapping so stack traces deobfuscate. The mapping upload reads the auth token from the SENTRY_AUTH_TOKEN env var or a git-ignored sentry.properties — never committed; the task SKIPS cleanly when absent, so CI and contributor builds without the secret still succeed. - Manual SentryAndroid.init() in PinakesApplication.onCreate (earliest point): DSN (a public ingest endpoint, safe in source), environment = debug/production by build type, release = applicationId@versionName+versionCode, isSendDefaultPii = false (no PII), tracesSampleRate = 0.0 (crash reporting only, no perf quota burn). Manifest disables the SDK auto-init ContentProvider so our init stays in control. - .gitignore: sentry.properties (auth token secret). Note: Sentry is NOT a Google service. Release APK grows 4.3 MB -> 9.0 MB (the sentry-android meta-package bundles native NDK crash capture); can be trimmed to sentry-android-core if size matters. Verified: assembleDebug + testDebugUnitTest 37/37 green; assembleRelease builds with R8, and uploadSentryProguardMappingsRelease is SKIPPED (no auth token) as designed.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Third in the "production-grade" series. Stacked on #11 (WorkManager) → #10 → #9. Sentry is not a Google service.
What
The app had no crash/ANR diagnostics. Integrated Sentry manually (cleaner, reviewable diff than the wizard — no example-error crash injected).
io.sentry.android.gradle4.14.1 — auto-installs the SDK and, on release, uploads the R8 mapping so stack traces deobfuscate. The auth token (mapping upload only) is read fromSENTRY_AUTH_TOKENenv / git-ignoredsentry.properties— never committed; the upload task SKIPS cleanly when absent, so CI/contributor builds without the secret still pass.SentryAndroid.init()inPinakesApplication(earliest point): DSN (public ingest endpoint, safe in source),environment= debug/production by build type,release=applicationId@versionName+versionCode,isSendDefaultPii = false,tracesSampleRate = 0.0(crash reporting only). Manifest disables the SDK auto-init provider so our init stays in control..gitignore:sentry.properties.To finish enabling mapping upload (your side)
Set the auth token once so release crash traces deobfuscate:
Reporting works without it; only mapping upload needs it.
Verified
assembleDebug+testDebugUnitTest37/37 green.assembleReleasebuilds with R8;uploadSentryProguardMappingsReleaseSKIPPED (no token) as designed.Note
Release APK grows 4.3 MB → 9.0 MB (the
sentry-androidmeta-package bundles native NDK crash capture). Can be trimmed tosentry-android-core(no native) if size matters — say the word.