diff --git a/gateway-ha/src/main/java/com/lyft/data/gateway/ha/handler/QueryIdCachingProxyHandler.java b/gateway-ha/src/main/java/com/lyft/data/gateway/ha/handler/QueryIdCachingProxyHandler.java index ea1b1873..270fb2df 100644 --- a/gateway-ha/src/main/java/com/lyft/data/gateway/ha/handler/QueryIdCachingProxyHandler.java +++ b/gateway-ha/src/main/java/com/lyft/data/gateway/ha/handler/QueryIdCachingProxyHandler.java @@ -1,5 +1,7 @@ package com.lyft.data.gateway.ha.handler; +import static com.codahale.metrics.MetricRegistry.name; + import com.codahale.metrics.Counter; import com.codahale.metrics.Meter; import com.codahale.metrics.MetricRegistry; @@ -30,7 +32,6 @@ import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.util.Callback; -import static com.codahale.metrics.MetricRegistry.name; @Slf4j public class QueryIdCachingProxyHandler extends ProxyHandler { @@ -281,12 +282,11 @@ protected void postConnectionHook( } catch (Exception e) { log.error("Error in proxying falling back to super call", e); } - if (response.getStatus() >= 500){ + if (response.getStatus() >= 500) { errorCounter5xx.inc(); - } else if (response.getStatus() >= 400){ + } else if (response.getStatus() >= 400) { errorCounter4xx.inc(); } - super.postConnectionHook(request, response, buffer, offset, length, callback); } diff --git a/gateway-ha/src/main/java/com/lyft/data/gateway/ha/module/HaGatewayProviderModule.java b/gateway-ha/src/main/java/com/lyft/data/gateway/ha/module/HaGatewayProviderModule.java index 6d4fbf99..b2b37c0f 100644 --- a/gateway-ha/src/main/java/com/lyft/data/gateway/ha/module/HaGatewayProviderModule.java +++ b/gateway-ha/src/main/java/com/lyft/data/gateway/ha/module/HaGatewayProviderModule.java @@ -1,6 +1,5 @@ package com.lyft.data.gateway.ha.module; -import com.codahale.metrics.Counter; import com.codahale.metrics.Meter; import com.codahale.metrics.MetricRegistry; import com.google.inject.Provides; @@ -25,7 +24,6 @@ import com.lyft.data.proxyserver.ProxyServerConfiguration; import io.dropwizard.setup.Environment; -import static com.codahale.metrics.MetricRegistry.name; public class HaGatewayProviderModule extends AppModule {