impl sentry
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Has been cancelled
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Has been cancelled
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
|
||||
|
||||
SpringApplication.run(Main.class, args); // Start the application
|
||||
// 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