client_java icon indicating copy to clipboard operation
client_java copied to clipboard

Dropwizard support for 1.0.0

Open jmachalica opened this issue 2 years ago • 7 comments
trafficstars

Is it possible to integrate this client version with dropwizard? I would like to expose its metrics for prometheus scraping. Should I use an archived simple client?

jmachalica avatar Oct 02 '23 13:10 jmachalica

Hi @jmachalica, the simpleclient_dropwizard module didn't make it into the 1.0.0 release, it's still on version 0.16.0. We are planning to port it over, but it will take some time. You have three options:

  1. Keep using 0.16.0 until a 1.x version of simpleclient_dropwizard is available. There's nothing wrong with 0.16.0.
  2. If you want to use prometheus-metrics-core 1.0.0 for new metrics but keep using simpleclient_dropwizard 0.16.0 for Dropwizard metrics, you can use both versions in parallel. Use the prometheus-metrics-simpleclient-bridge module as described here: https://prometheus.github.io/client_java/migration/simpleclient/.
  3. We are looking for volunteers to help us port the remaining 0.16.0 modules over to 1.0.0. So if you want to speed things up, feel free to create a PR. All you need is a MultiCollector for Dropwizard metrics that produces snapshots as defined in prometheus-metrics-model, see https://prometheus.github.io/client_java/internals/model/. I'm happy to help.

fstab avatar Oct 02 '23 19:10 fstab

Can we split this into metrics 4 and metrics 5 tickets? The change merged only supports metrics 5, we need metrics 4 for Dropwizard 3 and 4 support.

bmeier-pros avatar May 03 '24 15:05 bmeier-pros