Skip to content

ADFA-4751: Rebrand remaining Sentry references to GlitchTip#1548

Open
hal-eisen-adfa wants to merge 3 commits into
stagefrom
ADFA-4751-change-sentry-to-glitchtip
Open

ADFA-4751: Rebrand remaining Sentry references to GlitchTip#1548
hal-eisen-adfa wants to merge 3 commits into
stagefrom
ADFA-4751-change-sentry-to-glitchtip

Conversation

@hal-eisen-adfa

Copy link
Copy Markdown
Collaborator

What

Follow-up branding cleanup for the Sentry -> GlitchTip migration. The functional switch already landed in ADFA-4397 (#1490), which kept the io.sentry SDK on purpose — GlitchTip is Sentry-protocol-compatible — and only re-pointed the DSN. This PR updates the "Sentry" naming that migration left behind, most visibly the onboarding "Privacy & analytics" disclosure dialog that still told users the app uses Sentry.

Changes

User-facing / docs

  • privacy_disclosure_message (English + Indonesian) now names GlitchTip.
  • REVIEW.md / SECURITY.md prose -> GlitchTip. (Kept the Sentry.captureException(e) code example — that's the real SDK API.)

Our own identifiers renamed

  • SentryDiagnosticsContext -> GlitchTipDiagnosticsContext (file + test renamed)
  • SENTRY_ENV_DEV/PROD -> GLITCHTIP_ENV_DEV/PROD
  • shouldReportToSentry -> shouldReportToGlitchTip
  • sentryLogAppender -> glitchTipLogAppender

Comments / log strings that named Sentry as the backend -> GlitchTip.

Deliberately NOT changed (would break crash reporting)

All io.sentry.* imports and Sentry.* API calls, the manifest io.sentry.* meta-data keys and ${sentryDsn} placeholder, the io.sentry deps / gradle plugin / sentry {} block, and the proguard -keep io.sentry.** rules. Each kept anchor now carries a one-line note that the Sentry SDK is our GlitchTip client, so this doesn't get re-flagged later. Historical (Sentry APPDEVFORALL-####) provenance notes are left as-is (they record where a bug was actually observed; the IDs are Sentry's).

Notes for reviewer

  • Whitespace churn: Spotless (ratchet) retabbed a few touched files that were previously space-indented (CrashEventSubscriber, SafeLineChart, InstallationViewModel, AssetsInstallationHelper). Those hunks are whitespace-only and bring the files to the tab standard — review with "hide whitespace" for the semantic diff.
  • Out of scope / heads-up: local.properties (gitignored) still defines sentryDsnDebug/sentryDsnRelease pointing at ingest.us.sentry.io, but the build now reads GLITCHTIP_DSN. That's a per-developer config drift to fix separately; CI already injects GLITCHTIP_DSN.

Verification

  • ./gradlew :app:assembleV8Debug — BUILD SUCCESSFUL
  • ./gradlew :app:testV8DebugUnitTest for GlitchTipDiagnosticsContextTest + AssetsInstallationHelperTest — passing
  • ./gradlew spotlessApply — clean

The functional migration (ADFA-4397) kept the io.sentry SDK because
GlitchTip is Sentry-protocol-compatible, and re-pointed only the DSN.
This is the follow-up branding cleanup it left behind.

User-facing / docs / naming:
- privacy_disclosure_message onboarding string (English + Indonesian):
  now names GlitchTip instead of Sentry.
- REVIEW.md / SECURITY.md prose -> GlitchTip (kept the Sentry.captureException
  code example, which is the real SDK API).
- Renamed our own identifiers: SentryDiagnosticsContext ->
  GlitchTipDiagnosticsContext (file + test), SENTRY_ENV_* -> GLITCHTIP_ENV_*,
  shouldReportToSentry -> shouldReportToGlitchTip, sentryLogAppender ->
  glitchTipLogAppender.
- Backend/product comments and log strings -> GlitchTip.

Deliberately kept (would break crash reporting): all io.sentry.* imports and
Sentry.* API calls, the manifest io.sentry.* meta-data keys and ${sentryDsn}
placeholder, the io.sentry deps / plugin / sentry {} block, and the proguard
-keep io.sentry.** rules. Each kept anchor now carries a one-line note that the
Sentry SDK is our GlitchTip client. Historical "(Sentry APPDEVFORALL-####)"
provenance notes are left as-is.

Spotless (ratchet) retabbed a few touched files that were previously
space-indented; those whitespace-only hunks bring them to the tab standard.

Note: local.properties (gitignored) still uses old sentryDsn* keys pointing at
sentry.io while the build now reads GLITCHTIP_DSN -- a per-developer config
drift to fix separately, not part of this PR.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 84a93392-6252-402d-bf05-0cd47f480ed6

📥 Commits

Reviewing files that changed from the base of the PR and between 97b1620 and ec9edf5.

📒 Files selected for processing (1)
  • gradle/libs.versions.toml
💤 Files with no reviewable changes (1)
  • gradle/libs.versions.toml

📝 Walkthrough
  • Completed branding cleanup from Sentry to GlitchTip across user-facing privacy disclosures, developer/security documentation, inline code comments, log/event wording, and diagnostics context naming.
  • Renamed diagnostics/reporting identifiers and constants, including SentryDiagnosticsContextGlitchTipDiagnosticsContext, SENTRY_ENV_*GLITCHTIP_ENV_*, and shouldReportToSentryshouldReportToGlitchTip (plus related appender/log identifiers).
  • Updated Android crash/log reporting initialization to target GlitchTip (including environment selection and diagnostics context installation) while keeping the underlying Sentry SDK mechanics intact for GlitchTip compatibility.
  • Updated developer guidance to consistently reference GlitchTip for exception/crash wrapper behavior; adjusted security guidance so secrets/credentials are never logged or sent to analytics/GlitchTip.
  • Updated Gradle/ProGuard/manifest comments to reflect GlitchTip terminology (no intended functional build/SDK dependency changes).
  • Refreshed tests to validate the new GlitchTip reporting flags and diagnostics context test class naming.
  • Included Spotless whitespace-only formatting changes; formatting/build/test verification reported as passing.
  • Risk: renamed identifiers/flags may require downstream callers or integrations that referenced the prior Sentry-named symbols.

Walkthrough

The PR updates crash-reporting terminology and diagnostics wiring from Sentry to GlitchTip while retaining the Sentry SDK protocol, renames asset-installation reporting flags, and updates related guidance, tests, comments, and privacy disclosures.

Changes

GlitchTip reporting migration

Layer / File(s) Summary
Diagnostics and crash-reporting wiring
app/src/main/java/com/itsaky/androidide/app/..., app/src/main/java/com/itsaky/androidide/handlers/..., eventbus-events/..., app/src/test/...
Application initialization, diagnostics enrichment, crash handling, event documentation, and tests use GlitchTip-specific names and environment constants.
Asset installation failure reporting
app/src/main/java/com/itsaky/androidide/assets/..., app/src/main/java/com/itsaky/androidide/viewmodel/..., app/src/test/...
Failure results expose shouldReportToGlitchTip; missing assets suppress reporting, and installation handling/tests consume the renamed flag.
Provider references and disclosures
.github/workflows/..., REVIEW.md, SECURITY.md, app/build.gradle.kts, app/src/main/AndroidManifest.xml, app/proguard-rules.pro, gradle/libs.versions.toml, resources/src/main/res/...
Comments, guidance, privacy strings, and documentation identify GlitchTip while Sentry SDK configuration remains unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant IDEApplication
  participant DeviceProtectedApplicationLoader
  participant GlitchTipDiagnosticsContext
  participant SentryAppender
  IDEApplication->>GlitchTipDiagnosticsContext: record user-unlock context
  DeviceProtectedApplicationLoader->>GlitchTipDiagnosticsContext: install event enrichment
  DeviceProtectedApplicationLoader->>SentryAppender: configure and attach log appender
Loading

Possibly related PRs

Suggested reviewers: itsaky-adfa, daniel-adfa, jomen-adfa

Poem

A rabbit hops through logs of green,
GlitchTip now adorns the scene.
Sentry’s protocol stays in flight,
While docs and tests are named just right.
Assets whisper, “Report with care!” 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: rebranding remaining Sentry references to GlitchTip.
Description check ✅ Passed The description is detailed and directly matches the changeset, covering branding cleanup, renamed identifiers, and intentionally unchanged Sentry SDK pieces.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-4751-change-sentry-to-glitchtip

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
app/src/main/java/com/itsaky/androidide/viewmodel/InstallationViewModel.kt (1)

138-139: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer availableBytes over manual block calculation.

For consistency with other storage checks in the project (e.g., AssetsInstallationHelper.kt), consider using the built-in availableBytes property directly instead of calculating it manually using block size and counts.

💡 Proposed change
-		val availableStorageInBytes = stat.availableBlocksLong * stat.blockSizeLong
+		val availableStorageInBytes = stat.availableBytes
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/com/itsaky/androidide/viewmodel/InstallationViewModel.kt`
around lines 138 - 139, Update the storage calculation in the relevant
installation check to use stat.availableBytes directly for
availableStorageInBytes, removing the manual availableBlocksLong * blockSizeLong
computation; leave requiredStorageInBytes and the surrounding logic unchanged.
app/src/main/java/com/itsaky/androidide/assets/AssetsInstallationHelper.kt (1)

273-280: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Catch narrowly instead of using a broad catch-all.

Catching Exception broadly here is discouraged. The StatFs constructor throws IllegalArgumentException if the provided path is invalid. Based on the coding guidelines and learnings, prefer narrow exception handling that targets the specific expected exception type rather than using a catch-all block.

♻️ Proposed refactor
 	private fun getAvailableStorage(path: File): Long =
 		try {
 			val stat = StatFs(path.absolutePath)
 			stat.availableBytes
-		} catch (e: Exception) {
+		} catch (e: IllegalArgumentException) {
 			logger.warn("Failed to get available storage for {}: {}", path, e.message)
 			-1L
 		}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/com/itsaky/androidide/assets/AssetsInstallationHelper.kt`
around lines 273 - 280, Update getAvailableStorage to catch only
IllegalArgumentException from StatFs when the provided path is invalid,
preserving the existing warning and -1L fallback while removing the broad
Exception catch.

Sources: Coding guidelines, Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@app/src/main/java/com/itsaky/androidide/assets/AssetsInstallationHelper.kt`:
- Around line 273-280: Update getAvailableStorage to catch only
IllegalArgumentException from StatFs when the provided path is invalid,
preserving the existing warning and -1L fallback while removing the broad
Exception catch.

In `@app/src/main/java/com/itsaky/androidide/viewmodel/InstallationViewModel.kt`:
- Around line 138-139: Update the storage calculation in the relevant
installation check to use stat.availableBytes directly for
availableStorageInBytes, removing the manual availableBlocksLong * blockSizeLong
computation; leave requiredStorageInBytes and the surrounding logic unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 57df58e7-758d-435d-8668-01e45f043490

📥 Commits

Reviewing files that changed from the base of the PR and between 8077407 and ada77e0.

📒 Files selected for processing (21)
  • .github/workflows/analyze.yml
  • REVIEW.md
  • SECURITY.md
  • app/build.gradle.kts
  • app/proguard-rules.pro
  • app/src/androidTest/kotlin/com/itsaky/androidide/app/strictmode/WhitelistEngineTest.kt
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/com/itsaky/androidide/app/DeviceProtectedApplicationLoader.kt
  • app/src/main/java/com/itsaky/androidide/app/IDEApplication.kt
  • app/src/main/java/com/itsaky/androidide/assets/AssetsInstallationHelper.kt
  • app/src/main/java/com/itsaky/androidide/fragments/onboarding/GreetingFragment.kt
  • app/src/main/java/com/itsaky/androidide/handlers/CrashEventSubscriber.kt
  • app/src/main/java/com/itsaky/androidide/handlers/GlitchTipDiagnosticsContext.kt
  • app/src/main/java/com/itsaky/androidide/ui/SafeLineChart.kt
  • app/src/main/java/com/itsaky/androidide/viewmodel/InstallationViewModel.kt
  • app/src/test/java/com/itsaky/androidide/assets/AssetsInstallationHelperTest.kt
  • app/src/test/java/com/itsaky/androidide/handlers/GlitchTipDiagnosticsContextTest.kt
  • eventbus-events/src/main/java/com/itsaky/androidide/eventbus/events/editor/LayoutEditorEvents.kt
  • gradle/libs.versions.toml
  • resources/src/main/res/values-in-rID/strings.xml
  • resources/src/main/res/values/strings.xml

Follow-up to code review: the retab re-touched this comment line, so
swap its pre-existing em-dash for an ASCII '-' per CLAUDE.md code-style.
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.

2 participants