client_java
client_java copied to clipboard
Dropwizard - feature request - SampleBuilder to accept the original Dropwizard metrics
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,Gaugeinterface there - and current
DropwizardExportsstrips them:
new ArrayList<String>(), new ArrayList<String>()
- while we would like to translate them into
List<String> additionalLabelNames, List<String> additionalLabelValuesin Prometheus - and we wouldn't need to use write our own
DropwizardExports, but just plug in customSampleBuilder
Thanks for the feature request. I will get back to this as soon as the Exemplars feature is done.