Skip to content

feat(app): crash reporting via Sentry (vendor-neutral)#12

Open
fabiodalez-dev wants to merge 1 commit into
feat/workmanager-catalog-syncfrom
feat/sentry-crash-reporting
Open

feat(app): crash reporting via Sentry (vendor-neutral)#12
fabiodalez-dev wants to merge 1 commit into
feat/workmanager-catalog-syncfrom
feat/sentry-crash-reporting

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

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).

  • 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 auth token (mapping upload only) is read from SENTRY_AUTH_TOKEN env / git-ignored sentry.propertiesnever committed; the upload task SKIPS cleanly when absent, so CI/contributor builds without the secret still pass.
  • Manual SentryAndroid.init() in PinakesApplication (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:

export SENTRY_AUTH_TOKEN=...   # or put it in a git-ignored sentry.properties

Reporting works without it; only mapping upload needs it.

Verified

  • assembleDebug + testDebugUnitTest 37/37 green.
  • assembleRelease builds with R8; uploadSentryProguardMappingsRelease SKIPPED (no token) as designed.

Note

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 (no native) if size matters — say the word.

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.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@fabiodalez-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e759f00-fdb4-42b9-8823-aae11e0a6d6e

📥 Commits

Reviewing files that changed from the base of the PR and between b3c2fea and 7760c96.

📒 Files selected for processing (6)
  • .gitignore
  • app/build.gradle.kts
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/com/pinakes/app/PinakesApplication.kt
  • build.gradle.kts
  • gradle/libs.versions.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sentry-crash-reporting

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fabiodalez-dev

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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