forked from MinecraftUtilities/Backend
impl sentry
This commit is contained in:
parent
beda7fa230
commit
cca45057f0
7
pom.xml
7
pom.xml
@ -129,6 +129,13 @@
|
||||
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Sentry -->
|
||||
<dependency>
|
||||
<groupId>io.sentry</groupId>
|
||||
<artifactId>sentry</artifactId>
|
||||
<version>1.7.27</version>
|
||||
</dependency>
|
||||
|
||||
<!-- InfluxDB Metrics -->
|
||||
<dependency>
|
||||
<groupId>com.influxdb</groupId>
|
||||
|
@ -2,6 +2,7 @@ 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;
|
||||
@ -33,6 +34,14 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user