Class PeriodicMetricReaderBuilder
java.lang.Object
io.opentelemetry.sdk.metrics.export.PeriodicMetricReaderBuilder
A builder for
PeriodicMetricReader.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newPeriodicMetricReaderwith the configuration of this builder which can be registered with aSdkMeterProvider.setExecutor(ScheduledExecutorService executor) Sets theScheduledExecutorServiceto schedule reads on.setInterval(long interval, TimeUnit unit) Sets the interval of reads.setInterval(Duration interval) Sets the interval of reads.
-
Method Details
-
setInterval
Sets the interval of reads. If unset, defaults to 1Lmin. -
setInterval
Sets the interval of reads. If unset, defaults to 1Lmin. -
setExecutor
Sets theScheduledExecutorServiceto schedule reads on. -
build
Returns a newPeriodicMetricReaderwith the configuration of this builder which can be registered with aSdkMeterProvider.
-