From 90b953746978e8c0756f12297916407b5bc5128d Mon Sep 17 00:00:00 2001 From: Nicolas QUINQUENEL Date: Tue, 12 Nov 2024 15:27:53 +0100 Subject: [PATCH] Sentry IO PoC --- build.gradle.kts | 1 + .../java/org/sonarlint/intellij/core/BackendService.kt | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 9d082d4f1..11d75d49a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,6 +20,7 @@ plugins { idea signing alias(libs.plugins.cyclonedx) + id("io.sentry.jvm.gradle") version "4.13.0" } buildscript { diff --git a/src/main/java/org/sonarlint/intellij/core/BackendService.kt b/src/main/java/org/sonarlint/intellij/core/BackendService.kt index c66e6899c..061210661 100644 --- a/src/main/java/org/sonarlint/intellij/core/BackendService.kt +++ b/src/main/java/org/sonarlint/intellij/core/BackendService.kt @@ -39,6 +39,7 @@ import com.intellij.openapi.util.io.FileUtilRt import com.intellij.openapi.vfs.VirtualFile import com.intellij.serviceContainer.NonInjectable import com.intellij.ui.jcef.JBCefApp +import io.sentry.Sentry import java.io.IOException import java.net.URI import java.nio.file.Files @@ -278,6 +279,14 @@ class BackendService : Disposable { sloopPath.toFile().walkTopDown().forEach { file -> getService(GlobalLogOutput::class.java).log(file.absolutePath, ClientLogOutput.Level.INFO) } + + try { + throw RuntimeException("Big boom"); + } catch (ex: Exception) { + Sentry.init("https://ad1c1fe3cb2b12fc2d191ecd25f89866@o1316750.ingest.us.sentry.io/4508201175089152"); + Sentry.captureException(ex); + } + return sloopLauncher.start( sloopPath, jreHomePath,