How to convert dropwizard metrics to Prometheus format?

258 views Asked by At

I have spring boot application where I have dropwizard metrics I've registred metrics servlet like that:

@Bean
public ServletRegistrationBean<MetricsServlet> registerMetricsServlet(MetricRegistry metricRegistry) {
    return new ServletRegistrationBean<>(new MetricsServlet(metricRegistry), "/metrics/*");
}

and url localhost:8080/metrics responds with:

{"version":"4.0.0","gauges":{},"counters":{"counter":{"count":36}},"histograms":{},"meters":{},"timers":{}}

This output definitely is not ready to to be a payoad for Premetheus.

How can I provide output ready for Prometheus ?

0

There are 0 answers