Interface CollectionRegistration
-
- All Known Implementing Classes:
SdkMeterProvider.SdkCollectionRegistration
public interface CollectionRegistration
ACollectionRegistration
is passed to eachMetricReader
registered 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 registeredMetricProducer
s.static CollectionRegistration
noop()
Returns a noopCollectionRegistration
, useful forMetricReader
s to hold beforeMetricReader.register(CollectionRegistration)
is called.
-
-
-
Method Detail
-
noop
static CollectionRegistration noop()
Returns a noopCollectionRegistration
, useful forMetricReader
s 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 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
-
-