java-metrics icon indicating copy to clipboard operation
java-metrics copied to clipboard

Support 'optional' labels

Open objectiser opened this issue 7 years ago • 0 comments

Enable MetricsLabel to identify whether it is optional.

If supported by a MetricsReporter implementation, then instead of using a default value associated with a MetricsLabel, a label that is marked as being 'optional' can be excluded from being associated with a sampled value.

As discussed in https://github.com/opentracing-contrib/java-metrics/issues/1#issuecomment-308471323, this may apply for some reporter impls when dealing with the error label (i.e. don't add a label of error = false).

objectiser avatar Jun 14 '17 16:06 objectiser