Interface CollectionRegistration
public interface CollectionRegistration
A
CollectionRegistration is passed to each MetricReader registered with SdkMeterProvider, and provides readers the ability to trigger metric collections.- Since:
- 1.14.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<MetricData>Collect all metrics, including metrics from the SDK and any registeredMetricProducers.static CollectionRegistrationnoop()Returns a noopCollectionRegistration, useful forMetricReaders to hold beforeMetricReader.register(CollectionRegistration)is called.
-
Method Details
-
noop
Returns a noopCollectionRegistration, useful forMetricReaders to hold beforeMetricReader.register(CollectionRegistration)is called.- Since:
- 1.31.0
-
collectAllMetrics
Collect all metrics, including metrics from the SDK and any registeredMetricProducers.If
MetricReader.getMemoryMode()is configured toMemoryMode.REUSABLE_DATAdo not keep the result or any of its contained objects as they are to be reused to return the result for the next call to this method.- Since:
- 1.31.0
-