client: Sentry logging

This commit is contained in:
Owain van Brakel
2019-11-08 00:10:09 +01:00
parent 7f0a530417
commit 802a87b680
5 changed files with 13 additions and 18 deletions

View File

@@ -32,6 +32,8 @@ import com.google.inject.Inject;
import com.google.inject.Injector;
import io.reactivex.Completable;
import io.reactivex.schedulers.Schedulers;
import io.sentry.Sentry;
import io.sentry.SentryClient;
import java.io.File;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
@@ -244,6 +246,10 @@ public class RuneLite
}
}
SentryClient client = Sentry.init("https://fa31d674e44247fa93966c69a903770f@sentry.io/1811856");
client.setRelease(RuneLiteProperties.getPlusVersion());
final ClientLoader clientLoader = new ClientLoader(options.valueOf(updateMode));
Completable.fromAction(clientLoader::get)
.subscribeOn(Schedulers.single())

View File

@@ -6,6 +6,7 @@ import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.sentry.Sentry;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@@ -54,15 +55,7 @@ public class EventBus implements EventBusInterface
.cast(eventClass) // Cast it for easier usage
.subscribe(action, error ->
{
if (error instanceof RuntimeException)
{
log.error("Runtime Exception in eventbus", error);
System.exit(0);
}
else
{
log.error("Exception in eventbus", error);
}
Sentry.capture(error);
});
getCompositeDisposable(lifecycle).add(disposable);
@@ -84,15 +77,7 @@ public class EventBus implements EventBusInterface
.doFinally(() -> unregister(lifecycle))
.subscribe(action, error ->
{
if (error instanceof RuntimeException)
{
log.error("Runtime Exception in eventbus", error);
System.exit(0);
}
else
{
log.error("Exception in eventbus", error);
}
Sentry.capture(error);
});
getCompositeDisposable(lifecycle).add(disposable);