Interface MetricProducer

  • All Known Implementing Classes:
    SdkMeterProvider

    @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.

    • Method Detail

      • collectAllMetrics

        Collection<MetricData> collectAllMetrics()
        Returns a collection of produced MetricDatas to be exported. This will only be those metrics that have been produced since the last time this method was called.
        Returns:
        a collection of produced MetricDatas to be exported.