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 registeredMetricProducer
s.static CollectionRegistration
noop()
Returns a noopCollectionRegistration
, useful forMetricReader
s to hold beforeMetricReader.register(CollectionRegistration)
is called.
-
Method Details
-
noop
Returns a noopCollectionRegistration
, useful forMetricReader
s to hold beforeMetricReader.register(CollectionRegistration)
is called.- Since:
- 1.31.0
-
collectAllMetrics
Collect all metrics, including metrics from the SDK and any registeredMetricProducer
s.If
MetricReader.getMemoryMode()
is configured toMemoryMode.REUSABLE_DATA
do 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
-