diff --git a/pom.xml b/pom.xml index 6dc91a4..947f2ee 100644 --- a/pom.xml +++ b/pom.xml @@ -132,9 +132,8 @@ io.sentry - sentry - 1.7.27 - compile + sentry-spring-boot-starter-jakarta + 7.8.0 diff --git a/src/main/java/xyz/mcutils/backend/Main.java b/src/main/java/xyz/mcutils/backend/Main.java index 06a18c7..2e98d64 100644 --- a/src/main/java/xyz/mcutils/backend/Main.java +++ b/src/main/java/xyz/mcutils/backend/Main.java @@ -2,7 +2,6 @@ package xyz.mcutils.backend; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import io.sentry.Sentry; import lombok.SneakyThrows; import lombok.extern.log4j.Log4j2; import org.springframework.boot.SpringApplication; @@ -34,14 +33,6 @@ public class Main { } log.info("Found configuration at '{}'", config.getAbsolutePath()); // Log the found config - // Init Sentry - Sentry.init(); - Sentry.init("https://631d4c96be4d48d1bd1b3ea612cbcee7@glitchtip.fascinated.cc/2"); - - try { - SpringApplication.run(Main.class, args); // Start the application - } catch(Exception ex) { - Sentry.capture(ex); // Capture the exception with Sentry - } + SpringApplication.run(Main.class, args); // Start the application } } \ No newline at end of file diff --git a/src/main/java/xyz/mcutils/backend/websocket/impl/MetricsWebSocket.java b/src/main/java/xyz/mcutils/backend/websocket/impl/MetricsWebSocket.java index 308c754..7a3154d 100644 --- a/src/main/java/xyz/mcutils/backend/websocket/impl/MetricsWebSocket.java +++ b/src/main/java/xyz/mcutils/backend/websocket/impl/MetricsWebSocket.java @@ -1,8 +1,6 @@ package xyz.mcutils.backend.websocket.impl; import lombok.extern.log4j.Log4j2; -import org.jetbrains.annotations.NotNull; -import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.WebSocketSession; import xyz.mcutils.backend.Main; import xyz.mcutils.backend.common.Timer; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 19ae3c6..dca6516 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -23,6 +23,10 @@ spring: database: test port: 27017 +# Sentry Configuration +sentry: + dsn: "" + # The URL of the API public-url: http://localhost