java-metrics
java-metrics copied to clipboard
Support 'optional' labels
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
).