@ThreadSafe public interface MetricProducer
MetricProducer
is the interface that is used to make metric data available to the
OpenTelemetry exporters. Implementations should be stateful, in that each call to collectAllMetrics()
will return any metric generated since the last call was made.
Implementations must be thread-safe.
Modifier and Type | Method and Description |
---|---|
Collection<MetricData> |
collectAllMetrics()
Returns a collection of produced
MetricData s to be exported. |
Collection<MetricData> collectAllMetrics()
MetricData
s to be exported. This will only be those
metrics that have been produced since the last time this method was called.MetricData
s to be exported.