switch to springboot sentry
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m50s

This commit is contained in:
Lee 2024-04-21 18:50:57 +01:00
parent 23e240fce1
commit bf992713dc
4 changed files with 7 additions and 15 deletions

@ -132,9 +132,8 @@
<!-- Sentry --> <!-- Sentry -->
<dependency> <dependency>
<groupId>io.sentry</groupId> <groupId>io.sentry</groupId>
<artifactId>sentry</artifactId> <artifactId>sentry-spring-boot-starter-jakarta</artifactId>
<version>1.7.27</version> <version>7.8.0</version>
<scope>compile</scope>
</dependency> </dependency>
<!-- InfluxDB Metrics --> <!-- InfluxDB Metrics -->

@ -2,7 +2,6 @@ package xyz.mcutils.backend;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import io.sentry.Sentry;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
@ -34,14 +33,6 @@ public class Main {
} }
log.info("Found configuration at '{}'", config.getAbsolutePath()); // Log the found config log.info("Found configuration at '{}'", config.getAbsolutePath()); // Log the found config
// Init Sentry SpringApplication.run(Main.class, args); // Start the application
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
}
} }
} }

@ -1,8 +1,6 @@
package xyz.mcutils.backend.websocket.impl; package xyz.mcutils.backend.websocket.impl;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.jetbrains.annotations.NotNull;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketSession;
import xyz.mcutils.backend.Main; import xyz.mcutils.backend.Main;
import xyz.mcutils.backend.common.Timer; import xyz.mcutils.backend.common.Timer;

@ -23,6 +23,10 @@ spring:
database: test database: test
port: 27017 port: 27017
# Sentry Configuration
sentry:
dsn: ""
# The URL of the API # The URL of the API
public-url: http://localhost public-url: http://localhost