Interface CollectionRegistration
-
- All Known Implementing Classes:
SdkMeterProvider.SdkCollectionRegistration
public interface CollectionRegistrationACollectionRegistrationis passed to eachMetricReaderregistered withSdkMeterProvider, and provides readers the ability to trigger metric collections.- Since:
- 1.14.0
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Collection<MetricData>collectAllMetrics()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 Detail
-
noop
static CollectionRegistration noop()
Returns a noopCollectionRegistration, useful forMetricReaders to hold beforeMetricReader.register(CollectionRegistration)is called.- Since:
- 1.31.0
-
collectAllMetrics
default java.util.Collection<MetricData> 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
-
-