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) {
|
||||
String sentryDsn = Settings.getInstance().get("SENTRY_DSN");
|
||||
String env = Settings.getInstance().get("BOT_ENV", "dev");
|
||||
Sentry.init(options -> {
|
||||
options.setDsn(sentryDsn);
|
||||
options.setEnvironment(Settings.getInstance().get("BOT_ENV", "dev"));
|
||||
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
|
||||
// We recommend adjusting this value in production.
|
||||
options.setEnvironment(env);
|
||||
options.setTracesSampleRate(1.0);
|
||||
// When first trying Sentry it's good to see what the SDK is doing:
|
||||
options.setDebug(true);
|
||||
options.setDebug(env.equals("dev"));
|
||||
});
|
||||
|
||||
DBController.init();
|
||||
|
||||
|
||||
initJDA();
|
||||
|
||||
DBController.init();
|
||||
CommandManager.init();
|
||||
MusicManager.initPlayerManager();
|
||||
jda.addEventListener(new MessageReceivedHandler(), new EditHandler(), new ServerJoinHandler());
|
||||
|
||||
new WebApi(9000);
|
||||
jda.getPresence().setActivity(Activity.watching("you"));
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ public class LogHandler {
|
||||
sendMessageToChannel((CommandErrorException) e);
|
||||
} else if (e instanceof CommandExecutionException) {
|
||||
Sentry.captureException(e);
|
||||
|
||||
logInternally((CommandExecutionException) e);
|
||||
tryLogToDebugChannel((CommandExecutionException) e);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user