Class PeriodicMetricReaderBuilder
java.lang.Object
io.opentelemetry.sdk.metrics.export.PeriodicMetricReaderBuilder
Builder for
PeriodicMetricReader
.- Since:
- 1.14.0
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final long
private ScheduledExecutorService
private long
private final MetricExporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aPeriodicMetricReader
with the configuration of this builder.setExecutor
(ScheduledExecutorService executor) Sets theScheduledExecutorService
to schedule reads on.setInterval
(long interval, TimeUnit unit) Sets the interval of reads.setInterval
(Duration interval) Sets the interval of reads.
-
Field Details
-
DEFAULT_SCHEDULE_DELAY_MINUTES
static final long DEFAULT_SCHEDULE_DELAY_MINUTES- See Also:
-
metricExporter
-
intervalNanos
private long intervalNanos -
executor
-
-
Constructor Details
-
PeriodicMetricReaderBuilder
PeriodicMetricReaderBuilder(MetricExporter metricExporter)
-
-
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 theScheduledExecutorService
to schedule reads on. -
build
Build aPeriodicMetricReader
with the configuration of this builder.
-