@Test public void pluginExceptionsAreNotRecordedAsStyxUnexpectedErrors() { errorListener.proxyErrorOccurred(INTERNAL_SERVER_ERROR, new PluginException("bad")); assertThat(count("styx.response.status.500"), is(1)); assertThat(statusCountsExcluding("styx.response.status.500"), everyItem(is(0))); assertThat(meterCount("styx.errors"), is(0)); }
@Override public void proxyErrorOccurred(HttpResponseStatus status, Throwable cause) { record(status); if (isError(status)) { incrementExceptionCounter(cause, status); } }
HttpErrorStatusMetrics implements HttpErrorStatusListener { @Override public void proxyErrorOccurred(HttpResponseStatus status, Throwable cause) { record(status); if (isError(status)) { incrementExceptionCounter(cause, status); } } }
HttpErrorStatusMetrics implements HttpErrorStatusListener { @Override public void proxyErrorOccurred(HttpResponseStatus status, Throwable cause) { record(status); if (isError(status)) { incrementExceptionCounter(cause, status); } } HttpErrorStatusMetrics(MetricRegistry metricRegistry); }
HttpErrorStatusMetrics implements HttpErrorStatusListener { @Override public void proxyErrorOccurred(HttpResponseStatus status, Throwable cause) { record(status); if (isError(status)) { incrementExceptionCounter(cause, status); } } HttpErrorStatusMetrics(MetricRegistry metricRegistry); @Override void proxyErrorOccurred(HttpResponseStatus status, Throwable cause); @Override void proxyErrorOccurred(Throwable cause); @Override void proxyErrorOccurred(LiveHttpRequest request, InetSocketAddress clientAddress, HttpResponseStatus status, Throwable cause); @Override void proxyWriteFailure(LiveHttpRequest request, LiveHttpResponse response, Throwable cause); @Override void proxyingFailure(LiveHttpRequest request, LiveHttpResponse response, Throwable cause); }
HttpErrorStatusMetrics implements HttpErrorStatusListener { @Override public void proxyErrorOccurred(HttpResponseStatus status, Throwable cause) { record(status); if (isError(status)) { incrementExceptionCounter(cause, status); } } HttpErrorStatusMetrics(MetricRegistry metricRegistry); @Override void proxyErrorOccurred(HttpResponseStatus status, Throwable cause); @Override void proxyErrorOccurred(Throwable cause); @Override void proxyErrorOccurred(LiveHttpRequest request, InetSocketAddress clientAddress, HttpResponseStatus status, Throwable cause); @Override void proxyWriteFailure(LiveHttpRequest request, LiveHttpResponse response, Throwable cause); @Override void proxyingFailure(LiveHttpRequest request, LiveHttpResponse response, Throwable cause);  }