mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-01 15:36:45 +00:00
sentry changes
- info message on enabling - add release tag - disable uncaught exception handling to prevent reporting other plugins issues
This commit is contained in:
parent
b66e6d8335
commit
8119207254
@ -490,8 +490,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
checkForBukkitWorlds();
|
||||
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
|
||||
IrisToolbelt.retainMantleDataForSlice(BlockData.class.getCanonicalName());
|
||||
|
||||
reportError(new Exception("This is a test"));
|
||||
});
|
||||
}
|
||||
|
||||
@ -533,7 +531,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
Sentry.captureException(e);
|
||||
reportError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -551,7 +549,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
});
|
||||
});
|
||||
} catch (IrisException e) {
|
||||
Sentry.captureException(e);
|
||||
reportError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -951,6 +949,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
private static void setupSentry() {
|
||||
var settings = IrisSettings.get().getSentry();
|
||||
if (settings.disableAutoReporting || Sentry.isEnabled()) return;
|
||||
Iris.info("Enabling Sentry for anonymous error reporting. You can disable this in the settings.");
|
||||
Sentry.init(options -> {
|
||||
options.setDsn("https://b16ecc222e9c1e0c48faecacb906fd89@o4509451052646400.ingest.de.sentry.io/4509452722765904");
|
||||
if (settings.debug) {
|
||||
@ -958,6 +957,8 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
options.setDebug(true);
|
||||
}
|
||||
|
||||
options.setEnableUncaughtExceptionHandler(false);
|
||||
options.setRelease(Iris.instance.getDescription().getVersion());
|
||||
options.setBeforeSend((event, hint) -> {
|
||||
event.setTag("iris.safeguard", IrisSafeguard.mode());
|
||||
event.setTag("iris.nms", INMS.get().getClass().getCanonicalName());
|
||||
|
@ -71,6 +71,11 @@ public class CommandDeveloper implements DecreeExecutor {
|
||||
.engineStatus(sender());
|
||||
}
|
||||
|
||||
@Decree(description = "Send a test exception to sentry")
|
||||
public void Sentry() {
|
||||
Iris.reportError(new Exception("This is a test"));
|
||||
}
|
||||
|
||||
@Decree(description = "Test")
|
||||
public void dumpThreads() {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user