Package io.opentelemetry.sdk.metrics
Class SdkMeterProvider
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.SdkMeterProvider
-
- All Implemented Interfaces:
io.opentelemetry.api.metrics.MeterProvider,MetricProducer
public final class SdkMeterProvider extends Object implements io.opentelemetry.api.metrics.MeterProvider, MetricProducer
SdkMeterProviderimplementation forMeterProvider.This class is not intended to be used in application code and it is used only by
OpenTelemetry.WARNING: A MetricProducer is stateful. It will only return changes since the last time it was accessed. This means that if more than one
MetricExporterhas a handle to this MetricProducer, the two exporters will not receive copies of the same metric data to export.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SdkMeterProviderBuilderbuilder()Returns a newSdkMeterProviderBuilderforSdkMeterProvider.Collection<MetricData>collectAllMetrics()Returns a collection of producedMetricDatas to be exported.io.opentelemetry.api.metrics.MeterBuildermeterBuilder(String instrumentationName)
-
-
-
Method Detail
-
meterBuilder
public io.opentelemetry.api.metrics.MeterBuilder meterBuilder(@Nullable String instrumentationName)
- Specified by:
meterBuilderin interfaceio.opentelemetry.api.metrics.MeterProvider
-
collectAllMetrics
public Collection<MetricData> collectAllMetrics()
Description copied from interface:MetricProducerReturns a collection of producedMetricDatas to be exported. This will only be those metrics that have been produced since the last time this method was called.- Specified by:
collectAllMetricsin interfaceMetricProducer- Returns:
- a collection of produced
MetricDatas to be exported.
-
builder
public static SdkMeterProviderBuilder builder()
Returns a newSdkMeterProviderBuilderforSdkMeterProvider.- Returns:
- a new
SdkMeterProviderBuilderforSdkMeterProvider.
-
-