ADFA-4744: Remove Sentry#1541
Conversation
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>
There was a problem hiding this comment.
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.
📝 Walkthrough
WalkthroughSentry 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. ChangesSentry removal
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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 |
There was a problem hiding this comment.
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
📒 Files selected for processing (26)
app/build.gradle.ktsapp/src/main/AndroidManifest.xmlapp/src/main/java/com/itsaky/androidide/activities/editor/ProjectHandlerActivity.ktapp/src/main/java/com/itsaky/androidide/app/CredentialProtectedApplicationLoader.ktapp/src/main/java/com/itsaky/androidide/app/DeviceProtectedApplicationLoader.ktapp/src/main/java/com/itsaky/androidide/app/IDEApplication.ktapp/src/main/java/com/itsaky/androidide/assets/AssetsInstallationHelper.ktapp/src/main/java/com/itsaky/androidide/fragments/RecentProjectsFragment.ktapp/src/main/java/com/itsaky/androidide/fragments/debug/DebuggerFragment.ktapp/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.ktapp/src/main/java/com/itsaky/androidide/handlers/CrashEventSubscriber.ktapp/src/main/java/com/itsaky/androidide/handlers/SentryDiagnosticsContext.ktapp/src/main/java/com/itsaky/androidide/repositories/BreakpointRepository.ktapp/src/main/java/com/itsaky/androidide/services/builder/GradleBuildService.ktapp/src/main/java/com/itsaky/androidide/viewmodel/InstallationViewModel.ktapp/src/test/java/com/itsaky/androidide/assets/AssetsInstallationHelperTest.ktapp/src/test/java/com/itsaky/androidide/handlers/SentryDiagnosticsContextTest.ktgradle/libs.versions.tomllsp/kotlin/build.gradle.ktslsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/KotlinLanguageServer.ktlsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/CompilationEnvironment.ktlsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/index/KtSymbolIndex.ktlsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/index/SourceFileIndexer.ktlsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/compiler/modules/AbstractKtModule.ktresources/src/main/res/values-in-rID/strings.xmlresources/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
| } catch (_: Throwable) { | ||
| } |
There was a problem hiding this comment.
📐 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: CatchCancellationExceptionand rethrow it, then catchExceptionand log it usingLoggerFactory, rather than silently swallowingThrowable.app/src/main/java/com/itsaky/androidide/fragments/debug/DebuggerFragment.kt#L425-L426: Log the exception usingLoggerFactoryinstead of silently ignoring it, and prefer catching narrower exceptions if known.app/src/main/java/com/itsaky/androidide/fragments/onboarding/PermissionsFragment.kt#L406-L407: CatchActivityNotFoundExceptionspecifically (sincestartActivitymight fail if no browser is installed) and log it usinglogger, 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-L426app/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 & 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> |
There was a problem hiding this comment.
📐 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 & 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> |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -n "FirebaseAnalytics|setAnalyticsCollectionEnabled|privacy_policy_url|privacy_disclosure_message" app resourcesRepository: 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:
- 1: https://support.google.com/firebase/answer/6318039?hl=en
- 2: https://support.google.com/analytics/answer/11582702
- 3: https://firebase.google.com/docs/analytics/configure-data-collection
- 4: https://firebase.google.com/docs/analytics/userid
- 5: https://support.google.com/analytics/answer/9019185?hl=en
- 6: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics
- 7: https://firebase.google.com/support/privacy
Reword the Firebase disclosure to match actual collection
resources/src/main/res/values/strings.xml:660resources/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.
Summary
sentry-core,sentry-android-core,sentry-android-replay) and Gradle plugin from all build filesSentryDiagnosticsContext.ktand its testSentry.captureException,Sentry.addBreadcrumb,SentryAndroid.init, and related imports from 20+ source files acrossapp/andlsp/kotlin/shouldReportToSentryfield fromAssetsInstallationHelper.Result.FailureNote: 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:assembleDebugbuilds without Sentry-related errors./gradlew :lsp:kotlin:compileDebugKotlincompiles cleanly./gradlew :app:testDebugUnitTestpasses (including updatedAssetsInstallationHelperTest)CrashHandlerActivityas before)🤖 Generated with Claude Code