Skip to content

ADFA-4744: Remove Sentry#1541

Closed
davidschachterADFA wants to merge 1 commit into
stagefrom
ADFA-4744-remove-remaining-sentry-files
Closed

ADFA-4744: Remove Sentry#1541
davidschachterADFA wants to merge 1 commit into
stagefrom
ADFA-4744-remove-remaining-sentry-files

Conversation

@davidschachterADFA

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the Sentry SDK (sentry-core, sentry-android-core, sentry-android-replay) and Gradle plugin from all build files
  • Delete SentryDiagnosticsContext.kt and its test
  • Remove all Sentry.captureException, Sentry.addBreadcrumb, SentryAndroid.init, and related imports from 20+ source files across app/ and lsp/kotlin/
  • Remove Sentry manifest meta-data block (DSN, traces, replay, profiling config)
  • Remove shouldReportToSentry field from AssetsInstallationHelper.Result.Failure
  • Update privacy disclosure strings (English + Indonesian) to remove Sentry mention

Note: The ticket described this as "a few files left behind" but Sentry was still fully integrated. This PR completes a full removal.

Test plan

  • ./gradlew :app:assembleDebug builds without Sentry-related errors
  • ./gradlew :lsp:kotlin:compileDebugKotlin compiles cleanly
  • ./gradlew :app:testDebugUnitTest passes (including updated AssetsInstallationHelperTest)
  • App launches and crash handling still works (crashes go to CrashHandlerActivity as before)

🤖 Generated with Claude Code

Remove the Sentry SDK, Gradle plugin, and all call sites. Sentry was integrated
across the app and lsp/kotlin modules; this commit removes the dependency entirely
and cleans up every import, captureException, addBreadcrumb, and related
configuration (manifest meta-data, DSN placeholders, privacy disclosure strings).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@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

📝 Walkthrough
  • Removed Sentry SDKs, Gradle plugin, version-catalog entries, manifest configuration, diagnostics context, and all application/LSP reporting and breadcrumb call sites.
  • Preserved existing logging, crash handling, build behavior, and failure flows without Sentry reporting.
  • Removed Sentry-related privacy disclosure text in English and Indonesian.
  • Updated asset-installation failure handling and tests to validate exception wrapping instead of Sentry-reporting flags.
  • Risk: Crash and diagnostic events are no longer sent to Sentry, reducing production observability.
  • Risk: Some previously reported exceptions are now silently ignored; existing logging should be reviewed to ensure sufficient troubleshooting context.

Walkthrough

Sentry integration is removed from Gradle configuration, Android manifest metadata, application lifecycle and crash handling, operational error paths, Kotlin LSP instrumentation, diagnostics context, tests, and privacy disclosure strings.

Changes

Sentry removal

Layer / File(s) Summary
Build wiring and manifest cleanup
gradle/libs.versions.toml, app/build.gradle.kts, lsp/kotlin/build.gradle.kts, app/src/main/AndroidManifest.xml
Removes Sentry catalog entries, dependencies, plugin configuration, DSN placeholders, and manifest metadata.
Application startup and crash handling
app/src/main/java/com/itsaky/androidide/app/*, app/src/main/java/com/itsaky/androidide/handlers/CrashEventSubscriber.kt
Removes Sentry initialization, diagnostics enrichment, exception capture, and crash forwarding while retaining existing crash handling and logging.
Operational error-path cleanup
app/src/main/java/com/itsaky/androidide/{activities,assets,fragments,repositories,services,viewmodel}/..., app/src/test/java/com/itsaky/androidide/assets/*
Removes Sentry reporting from project, installation, fragment, repository, and build-service failures; updates the installation failure contract and test assertions.
Kotlin LSP instrumentation cleanup
lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/...
Removes Sentry breadcrumbs, exception capture, attachments, and related imports while preserving compiler and indexing operations.
Privacy disclosure update
resources/src/main/res/values*/strings.xml
Removes Sentry wording from privacy disclosure strings.

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

Possibly related PRs

Suggested reviewers: jomen-adfa, itsaky-adfa

Poem

I’m a rabbit hopping through the code,
Removing Sentry from each road.
Logs still glow and crashes land,
Clean builds march across the land.
No breadcrumbs trail behind—
Just tidy hops and peace of mind.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: removing Sentry from the project.
Description check ✅ Passed The description is directly related to the changeset and accurately describes the Sentry removal work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-4744-remove-remaining-sentry-files
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch ADFA-4744-remove-remaining-sentry-files

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.

Actionable comments posted: 3

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

Inline comments:
In `@app/src/main/java/com/itsaky/androidide/fragments/RecentProjectsFragment.kt`:
- Around line 326-327: Replace the silent broad catch in
RecentProjectsFragment.kt lines 326-327 with CancellationException rethrowing
followed by an Exception catch logged through LoggerFactory; in
DebuggerFragment.kt lines 425-426, log the handled exception with LoggerFactory
and narrow the caught type where known; in PermissionsFragment.kt lines 406-407,
catch ActivityNotFoundException specifically and log it through the existing
logger instead of swallowing Throwable.

In `@resources/src/main/res/values-in-rID/strings.xml`:
- Line 588: Update the privacy_disclosure_message line in the XML resources to
use tab indentation instead of spaces, preserving the string content unchanged.

In `@resources/src/main/res/values/strings.xml`:
- Line 660: Reword the privacy_disclosure_message string in
resources/src/main/res/values/strings.xml at lines 660-660 to accurately
describe Firebase Analytics data collection, removing absolute claims that all
data is anonymous and that no personal information is collected or shared. Apply
the same wording change to resources/src/main/res/values-in-rID/strings.xml at
lines 588-588, keeping both localized resources consistent with the privacy
policy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 12372f77-a39b-4f9a-a58e-c830f21b0bf6

📥 Commits

Reviewing files that changed from the base of the PR and between 51b1605 and 95b8fd4.

📒 Files selected for processing (26)
  • app/build.gradle.kts
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/com/itsaky/androidide/activities/editor/ProjectHandlerActivity.kt
  • app/src/main/java/com/itsaky/androidide/app/CredentialProtectedApplicationLoader.kt
  • 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/RecentProjectsFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/debug/DebuggerFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt
  • app/src/main/java/com/itsaky/androidide/handlers/CrashEventSubscriber.kt
  • app/src/main/java/com/itsaky/androidide/handlers/SentryDiagnosticsContext.kt
  • app/src/main/java/com/itsaky/androidide/repositories/BreakpointRepository.kt
  • app/src/main/java/com/itsaky/androidide/services/builder/GradleBuildService.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/SentryDiagnosticsContextTest.kt
  • gradle/libs.versions.toml
  • lsp/kotlin/build.gradle.kts
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/KotlinLanguageServer.kt
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/CompilationEnvironment.kt
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/index/KtSymbolIndex.kt
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/index/SourceFileIndexer.kt
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/modules/AbstractKtModule.kt
  • resources/src/main/res/values-in-rID/strings.xml
  • resources/src/main/res/values/strings.xml
💤 Files with no reviewable changes (17)
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/index/KtSymbolIndex.kt
  • app/src/main/java/com/itsaky/androidide/handlers/SentryDiagnosticsContext.kt
  • app/src/main/java/com/itsaky/androidide/repositories/BreakpointRepository.kt
  • app/src/test/java/com/itsaky/androidide/handlers/SentryDiagnosticsContextTest.kt
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/KotlinLanguageServer.kt
  • lsp/kotlin/build.gradle.kts
  • app/src/main/java/com/itsaky/androidide/services/builder/GradleBuildService.kt
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/modules/AbstractKtModule.kt
  • app/src/main/java/com/itsaky/androidide/activities/editor/ProjectHandlerActivity.kt
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/index/SourceFileIndexer.kt
  • app/src/main/java/com/itsaky/androidide/app/IDEApplication.kt
  • gradle/libs.versions.toml
  • lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/CompilationEnvironment.kt
  • app/src/main/java/com/itsaky/androidide/app/DeviceProtectedApplicationLoader.kt
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/com/itsaky/androidide/app/CredentialProtectedApplicationLoader.kt
  • app/src/main/java/com/itsaky/androidide/viewmodel/InstallationViewModel.kt

Comment on lines +326 to 327
} catch (_: Throwable) {
}

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Do not silently swallow exceptions with broad catch-alls.

When removing Sentry error reporting, the catch blocks were changed to silently swallow Exception or Throwable. As per coding guidelines and learnings, you must log handled exceptions, avoid broad catch-all blocks, and rethrow coroutine CancellationException where applicable.

  • app/src/main/java/com/itsaky/androidide/fragments/RecentProjectsFragment.kt#L326-L327: Catch CancellationException and rethrow it, then catch Exception and log it using LoggerFactory, rather than silently swallowing Throwable.
  • app/src/main/java/com/itsaky/androidide/fragments/debug/DebuggerFragment.kt#L425-L426: Log the exception using LoggerFactory instead of silently ignoring it, and prefer catching narrower exceptions if known.
  • app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt#L406-L407: Catch ActivityNotFoundException specifically (since startActivity might fail if no browser is installed) and log it using logger, instead of using a silent catch-all.
📍 Affects 3 files
  • app/src/main/java/com/itsaky/androidide/fragments/RecentProjectsFragment.kt#L326-L327 (this comment)
  • app/src/main/java/com/itsaky/androidide/fragments/debug/DebuggerFragment.kt#L425-L426
  • app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt#L406-L407
🤖 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/fragments/RecentProjectsFragment.kt`
around lines 326 - 327, Replace the silent broad catch in
RecentProjectsFragment.kt lines 326-327 with CancellationException rethrowing
followed by an Exception catch logged through LoggerFactory; in
DebuggerFragment.kt lines 425-426, log the handled exception with LoggerFactory
and narrow the caught type where known; in PermissionsFragment.kt lines 406-407,
catch ActivityNotFoundException specifically and log it through the existing
logger instead of swallowing Throwable.

Sources: Coding guidelines, Learnings


<string name="privacy_disclosure_title">Privasi &amp; analitik</string>
<string name="privacy_disclosure_message">Code on the Go menggunakan Firebase Analytics dan Sentry untuk membantu kami meningkatkan aplikasi.\n\nFirebase Analytics mengumpulkan data penggunaan anonim untuk membantu kami memahami bagaimana aplikasi digunakan.\n\nSentry membantu kami melacak dan memperbaiki masalah.\n\nTidak ada informasi pribadi yang dikumpulkan atau dibagikan. Semua data diproses sesuai dengan kebijakan privasi kami.</string>
<string name="privacy_disclosure_message">Code on the Go menggunakan Firebase Analytics untuk membantu kami meningkatkan aplikasi.\n\nFirebase Analytics mengumpulkan data penggunaan anonim untuk membantu kami memahami bagaimana aplikasi digunakan.\n\nTidak ada informasi pribadi yang dikumpulkan atau dibagikan. Semua data diproses sesuai dengan kebijakan privasi kami.</string>

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use tab indentation for the changed XML line.

The repository requires tabs for XML indentation, but this changed line is indented with spaces.

🤖 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 `@resources/src/main/res/values-in-rID/strings.xml` at line 588, Update the
privacy_disclosure_message line in the XML resources to use tab indentation
instead of spaces, preserving the string content unchanged.

Source: Coding guidelines


<string name="privacy_disclosure_title">Privacy &amp; analytics</string>
<string name="privacy_disclosure_message">Code on the Go uses Firebase Analytics and Sentry to help us improve the app.\n\nFirebase Analytics collects anonymous usage data to help us understand how the app is used. \n\nSentry helps us track and fix errors.\n\nNo personal information is collected or shared. All data is processed in accordance with our privacy policy.</string>
<string name="privacy_disclosure_message">Code on the Go uses Firebase Analytics to help us improve the app.\n\nFirebase Analytics collects anonymous usage data to help us understand how the app is used.\n\nNo personal information is collected or shared. All data is processed in accordance with our privacy policy.</string>

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n "FirebaseAnalytics|setAnalyticsCollectionEnabled|privacy_policy_url|privacy_disclosure_message" app resources

Repository: appdevforall/CodeOnTheGo

Length of output: 2240


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the analytics implementation and onboarding disclosure usage.
sed -n '1,220p' app/src/main/java/com/itsaky/androidide/analytics/AnalyticsManager.kt
printf '\n---\n'
sed -n '340,430p' app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt
printf '\n---\n'
sed -n '640,675p' resources/src/main/res/values/strings.xml
printf '\n---\n'
sed -n '575,600p' resources/src/main/res/values-in-rID/strings.xml
printf '\n---\n'
# Look for any privacy/data-safety related declarations in the repo.
rg -n "Data safety|data safety|privacy notice|privacy policy|personal information|anonymous usage|Firebase Analytics|setAnalyticsCollectionEnabled" app resources .

Repository: appdevforall/CodeOnTheGo

Length of output: 13804


🌐 Web query:

Firebase Analytics data collection anonymous usage data personal information identifiers official documentation

💡 Result:

Google Analytics for Firebase collects various data points and identifiers by default to facilitate analytics, measurement, and reporting [1][2]. The SDK's data collection practices regarding identifiers and personal information are outlined below. Data Collection and Identifiers By default, the Firebase SDK collects several identifiers to track app usage, including: - App-instance ID: An identifier automatically generated at the app level to identify a unique installation of the app [1][2]. It is used for computing user metrics and is not, by default, associated with personal identifiers like a user's name or account ID [2]. - Advertising Identifiers: On Android, the SDK collects the Android Advertising ID [1][2]. On iOS, it collects the Advertising Identifier (IDFA) if the AdSupport framework is linked, or the Identifier for Vendor (IDFV) if the advertising identifier is unavailable [1][3]. - Device Information: The SDK collects information such as device model, operating system, and geography (derived from masked IP addresses) [1][2]. Personal Information and User ID Google Analytics for Firebase allows developers to set an optional User ID to associate analytics data across multiple devices or sessions [4][2]. - Important Restriction: Developers are responsible for ensuring that any User ID used does not contain personally identifiable information (PII) [4]. You must not use information that a third party could use to determine the identity of an individual (e.g., email addresses or social security numbers) [4]. - Google Signals: If enabled, Google may also collect signed-in account information [2]. Privacy Controls and Consent Developers have significant control over data collection and can adjust settings to comply with legal obligations or user preferences [3][5]: - Consent Mode: Developers can use the Consent Mode API to manage the collection of identifiers based on end-user consent [2][6]. - Disabling Collection: Data collection can be temporarily or permanently disabled via SDK methods (e.g., setAnalyticsCollectionEnabled) or by configuring project settings [3][5]. - Ad Personalization: Developers can disable personalized advertising signals, which instructs the SDK to include a non_personalized_ads property in event bundles [3]. Developers should review the official Firebase and Google Analytics documentation to ensure their implementation aligns with their privacy policies and applicable regulations [4][5][7]. Top Results: [1] https://support.google.com/firebase/answer/6318039 [3] https://firebase.google.com/docs/analytics/configure-data-collection [4] https://firebase.google.com/docs/analytics/userid [2] https://support.google.com/analytics/answer/11582702 [5] https://support.google.com/analytics/answer/9019185 [7] https://firebase.google.com/support/privacy

Citations:


Reword the Firebase disclosure to match actual collection

  • resources/src/main/res/values/strings.xml:660
  • resources/src/main/res/values-in-rID/strings.xml:588

Firebase Analytics is enabled and the app sends analytics events, so the absolute claims about “anonymous” data and “No personal information” are too broad. Use wording that matches the actual data collected and the privacy policy.

📍 Affects 2 files
  • resources/src/main/res/values/strings.xml#L660-L660 (this comment)
  • resources/src/main/res/values-in-rID/strings.xml#L588-L588
🤖 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 `@resources/src/main/res/values/strings.xml` at line 660, Reword the
privacy_disclosure_message string in resources/src/main/res/values/strings.xml
at lines 660-660 to accurately describe Firebase Analytics data collection,
removing absolute claims that all data is anonymous and that no personal
information is collected or shared. Apply the same wording change to
resources/src/main/res/values-in-rID/strings.xml at lines 588-588, keeping both
localized resources consistent with the privacy policy.

@davidschachterADFA
davidschachterADFA deleted the ADFA-4744-remove-remaining-sentry-files branch July 17, 2026 02:11
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