client_java icon indicating copy to clipboard operation
client_java copied to clipboard

Dropwizard - feature request - SampleBuilder to accept the original Dropwizard metrics

Open mccartney opened this issue 4 years ago • 1 comments
trafficstars

What

The current SampleBuilder interface's only method has the following signature:

    Collector.MetricFamilySamples.Sample createSample(String dropwizardName, String nameSuffix, List<String> additionalLabelNames, List<String> additionalLabelValues, double value);

It would be useful for us (and maybe others?) if the method interface included the original Dropwizard metric, i.e. instance of com.codahale.metrics.Metric.

Why

Why it'd be useful for us:

  • we have the metrics in Dropwizard with custom metadata there (passing additional key-values) on top of the standard Counter, Gauge interface there
  • and current DropwizardExports strips them:
new ArrayList<String>(), new ArrayList<String>()
  • while we would like to translate them into List<String> additionalLabelNames, List<String> additionalLabelValues in Prometheus
  • and we wouldn't need to use write our own DropwizardExports, but just plug in custom SampleBuilder

mccartney avatar Apr 26 '21 13:04 mccartney

Thanks for the feature request. I will get back to this as soon as the Exemplars feature is done.

fstab avatar May 02 '21 20:05 fstab