@Test public void exposesRegisteredMetrics() { metricRegistry.counter("foo").inc(); HttpResponse response = Mono.from(handler.handle(get("/admin/metrics").build(), requestContext())).block(); assertThat(response.bodyAs(UTF_8), matchesRegex(quote("{\"version\":\"") + "\\d+\\.\\d+\\.\\d+" + quote("\",\"gauges\":{},\"counters\":{\"foo\":{\"count\":1}},\"histograms\":{},\"meters\":{},\"timers\":{}}"))); }
@Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return this.urlMatcher.handle(request, context); }
MetricsHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return this.urlMatcher.handle(request, context); } }
MetricsHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return this.urlMatcher.handle(request, context); } MetricsHandler(MetricRegistry metricRegistry, Optional<Duration> cacheExpiration); }
MetricsHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return this.urlMatcher.handle(request, context); } MetricsHandler(MetricRegistry metricRegistry, Optional<Duration> cacheExpiration); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context); }
MetricsHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return this.urlMatcher.handle(request, context); } MetricsHandler(MetricRegistry metricRegistry, Optional<Duration> cacheExpiration); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context);  }