Remove bugsnag, with all async code it serves little to no purpose

This commit is contained in:
Colin McDonald 2016-06-23 01:01:54 -04:00
parent 66b2fc5951
commit 61197b1050
4 changed files with 1 additions and 48 deletions

View File

@ -116,13 +116,6 @@
<version>0.5.0</version>
</dependency>
<!-- Monitoring -->
<dependency>
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag</artifactId>
<version>2.0.0</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>

View File

@ -1,6 +1,5 @@
package net.frozenorb.apiv3;
import com.bugsnag.Client;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.PropertyAccessor;
@ -75,7 +74,6 @@ import net.frozenorb.apiv3.serialization.jackson.InstantJsonSerializer;
import net.frozenorb.apiv3.serialization.jackson.UuidJsonDeserializer;
import net.frozenorb.apiv3.serialization.jackson.UuidJsonSerializer;
import net.frozenorb.apiv3.serialization.mongodb.UuidCodecProvider;
import net.frozenorb.apiv3.unsorted.BugsnagSlf4jLogger;
import org.bson.Document;
import org.bson.codecs.BsonValueCodecProvider;
import org.bson.codecs.DocumentCodecProvider;
@ -107,7 +105,6 @@ public final class APIv3 extends AbstractVerticle {
vertxInstance = vertx;
setupConfig();
setupDatabase();
setupBugsnag();
setupHttpServer();
/*V2Importer converter = new V2Importer("mongodb://158.69.126.126", "minehq");
@ -210,13 +207,6 @@ public final class APIv3 extends AbstractVerticle {
return mongoJacksonMapper;
}
private void setupBugsnag() {
Client bugsnag = new Client(config.getProperty("bugsnag.apiKey"));
bugsnag.setReleaseStage(config.getProperty("general.releaseStage"));
bugsnag.setProjectPackages("net.frozenorb.apiv3");
bugsnag.setLogger(new BugsnagSlf4jLogger());
}
private void setupHttpServer() {
HttpServer webServer = vertx.createHttpServer(
new HttpServerOptions()
@ -231,7 +221,7 @@ public final class APIv3 extends AbstractVerticle {
http.route().method(HttpMethod.PUT).method(HttpMethod.POST).handler(BodyHandler.create());
http.route().handler(new ActorAttributeHandler());
http.route().handler(new AuthorizationHandler());
http.exceptionHandler(Throwable::printStackTrace); // TODO: BUGSNAG
http.exceptionHandler(Throwable::printStackTrace);
// TODO: The commented out routes

View File

@ -1,29 +0,0 @@
package net.frozenorb.apiv3.unsorted;
import com.bugsnag.Logger;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public final class BugsnagSlf4jLogger extends Logger {
public void debug(String message) {
log.debug(message);
}
public void info(String message) {
log.info(message);
}
public void warn(String message) {
log.warn(message);
}
public void warn(String message, Throwable ex) {
log.warn(message, ex);
}
public void warn(Throwable ex) {
log.warn("error in bugsnag", ex);
}
}

View File

@ -21,7 +21,6 @@ public class ErrorUtils {
}
public static void respondInternalError(RoutingContext ctx, Throwable error) {
// TODO: BUGSNAG
error.printStackTrace();
respondGeneric(ctx, 500, "Internal error: " + error.getClass().getSimpleName());
}