Package io.opentelemetry.sdk.metrics
Class SdkMeterProvider
java.lang.Object
io.opentelemetry.sdk.metrics.SdkMeterProvider
- All Implemented Interfaces:
io.opentelemetry.api.metrics.MeterProvider
,Closeable
,AutoCloseable
public final class SdkMeterProvider
extends Object
implements io.opentelemetry.api.metrics.MeterProvider, Closeable
SDK implementation for
MeterProvider
.- Since:
- 1.14.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic SdkMeterProviderBuilder
builder()
Returns a newSdkMeterProviderBuilder
forSdkMeterProvider
.void
close()
Close the meter provider.io.opentelemetry.sdk.common.CompletableResultCode
CallMetricReader.forceFlush()
on all metric readers associated with this provider.io.opentelemetry.api.metrics.MeterBuilder
meterBuilder
(String instrumentationScopeName) io.opentelemetry.sdk.common.CompletableResultCode
shutdown()
Shutdown the provider.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.opentelemetry.api.metrics.MeterProvider
get
-
Method Details
-
builder
Returns a newSdkMeterProviderBuilder
forSdkMeterProvider
. -
meterBuilder
- Specified by:
meterBuilder
in interfaceio.opentelemetry.api.metrics.MeterProvider
-
forceFlush
public io.opentelemetry.sdk.common.CompletableResultCode forceFlush()CallMetricReader.forceFlush()
on all metric readers associated with this provider. The resultingCompletableResultCode
completes when all complete. -
shutdown
public io.opentelemetry.sdk.common.CompletableResultCode shutdown()Shutdown the provider. CallsMetricReader.shutdown()
on all metric readers associated with this provider. The resultingCompletableResultCode
completes when all complete. -
close
public void close()Close the meter provider. Callsshutdown()
and blocks waiting for it to complete.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
toString
-