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.
Enable
MetricsLabel
to identify whether it is optional.If supported by a
MetricsReporter
implementation, then instead of using a default value associated with aMetricsLabel
, 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 oferror = false
).