switch to springboot sentry

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 -->
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>1.7.27</version>
<scope>compile</scope>
<artifactId>sentry-spring-boot-starter-jakarta</artifactId>
<version>7.8.0</version>
</dependency>
<!-- InfluxDB Metrics -->

@ -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
}
}

@ -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;

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