Remove bugsnag, with all async code it serves little to no purpose
This commit is contained in:
parent
66b2fc5951
commit
61197b1050
7
pom.xml
7
pom.xml
|
@ -116,13 +116,6 @@
|
||||||
<version>0.5.0</version>
|
<version>0.5.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Monitoring -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.bugsnag</groupId>
|
|
||||||
<artifactId>bugsnag</artifactId>
|
|
||||||
<version>2.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Logging -->
|
<!-- Logging -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.frozenorb.apiv3;
|
package net.frozenorb.apiv3;
|
||||||
|
|
||||||
import com.bugsnag.Client;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
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.UuidJsonDeserializer;
|
||||||
import net.frozenorb.apiv3.serialization.jackson.UuidJsonSerializer;
|
import net.frozenorb.apiv3.serialization.jackson.UuidJsonSerializer;
|
||||||
import net.frozenorb.apiv3.serialization.mongodb.UuidCodecProvider;
|
import net.frozenorb.apiv3.serialization.mongodb.UuidCodecProvider;
|
||||||
import net.frozenorb.apiv3.unsorted.BugsnagSlf4jLogger;
|
|
||||||
import org.bson.Document;
|
import org.bson.Document;
|
||||||
import org.bson.codecs.BsonValueCodecProvider;
|
import org.bson.codecs.BsonValueCodecProvider;
|
||||||
import org.bson.codecs.DocumentCodecProvider;
|
import org.bson.codecs.DocumentCodecProvider;
|
||||||
|
@ -107,7 +105,6 @@ public final class APIv3 extends AbstractVerticle {
|
||||||
vertxInstance = vertx;
|
vertxInstance = vertx;
|
||||||
setupConfig();
|
setupConfig();
|
||||||
setupDatabase();
|
setupDatabase();
|
||||||
setupBugsnag();
|
|
||||||
setupHttpServer();
|
setupHttpServer();
|
||||||
|
|
||||||
/*V2Importer converter = new V2Importer("mongodb://158.69.126.126", "minehq");
|
/*V2Importer converter = new V2Importer("mongodb://158.69.126.126", "minehq");
|
||||||
|
@ -210,13 +207,6 @@ public final class APIv3 extends AbstractVerticle {
|
||||||
return mongoJacksonMapper;
|
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() {
|
private void setupHttpServer() {
|
||||||
HttpServer webServer = vertx.createHttpServer(
|
HttpServer webServer = vertx.createHttpServer(
|
||||||
new HttpServerOptions()
|
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().method(HttpMethod.PUT).method(HttpMethod.POST).handler(BodyHandler.create());
|
||||||
http.route().handler(new ActorAttributeHandler());
|
http.route().handler(new ActorAttributeHandler());
|
||||||
http.route().handler(new AuthorizationHandler());
|
http.route().handler(new AuthorizationHandler());
|
||||||
http.exceptionHandler(Throwable::printStackTrace); // TODO: BUGSNAG
|
http.exceptionHandler(Throwable::printStackTrace);
|
||||||
|
|
||||||
// TODO: The commented out routes
|
// TODO: The commented out routes
|
||||||
|
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -21,7 +21,6 @@ public class ErrorUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void respondInternalError(RoutingContext ctx, Throwable error) {
|
public static void respondInternalError(RoutingContext ctx, Throwable error) {
|
||||||
// TODO: BUGSNAG
|
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
respondGeneric(ctx, 500, "Internal error: " + error.getClass().getSimpleName());
|
respondGeneric(ctx, 500, "Internal error: " + error.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue