Sentry env
This commit is contained in:
1 parent
e3f47bbfe5
commit
932be70407
2 files changed
+4
-11
No files matched your search
@@ -30,25 +30,19 @@ public class NetNeutrality {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String sentryDsn = Settings.getInstance().get("SENTRY_DSN");
|
String sentryDsn = Settings.getInstance().get("SENTRY_DSN");
|
||||||
|
String env = Settings.getInstance().get("BOT_ENV", "dev");
|
||||||
Sentry.init(options -> {
|
Sentry.init(options -> {
|
||||||
options.setDsn(sentryDsn);
|
options.setDsn(sentryDsn);
|
||||||
options.setEnvironment(Settings.getInstance().get("BOT_ENV", "dev"));
|
options.setEnvironment(env);
|
||||||
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
|
|
||||||
// We recommend adjusting this value in production.
|
|
||||||
options.setTracesSampleRate(1.0);
|
options.setTracesSampleRate(1.0);
|
||||||
// When first trying Sentry it's good to see what the SDK is doing:
|
options.setDebug(env.equals("dev"));
|
||||||
options.setDebug(true);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
DBController.init();
|
|
||||||
|
|
||||||
|
|
||||||
initJDA();
|
initJDA();
|
||||||
|
DBController.init();
|
||||||
CommandManager.init();
|
CommandManager.init();
|
||||||
MusicManager.initPlayerManager();
|
MusicManager.initPlayerManager();
|
||||||
jda.addEventListener(new MessageReceivedHandler(), new EditHandler(), new ServerJoinHandler());
|
jda.addEventListener(new MessageReceivedHandler(), new EditHandler(), new ServerJoinHandler());
|
||||||
|
|
||||||
new WebApi(9000);
|
new WebApi(9000);
|
||||||
jda.getPresence().setActivity(Activity.watching("you"));
|
jda.getPresence().setActivity(Activity.watching("you"));
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ public class LogHandler {
|
|||||||
sendMessageToChannel((CommandErrorException) e);
|
sendMessageToChannel((CommandErrorException) e);
|
||||||
} else if (e instanceof CommandExecutionException) {
|
} else if (e instanceof CommandExecutionException) {
|
||||||
Sentry.captureException(e);
|
Sentry.captureException(e);
|
||||||
|
|
||||||
logInternally((CommandExecutionException) e);
|
logInternally((CommandExecutionException) e);
|
||||||
tryLogToDebugChannel((CommandExecutionException) e);
|
tryLogToDebugChannel((CommandExecutionException) e);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user