Class IntervalMetricReader
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.export.IntervalMetricReader
-
public final class IntervalMetricReader extends Object
Wraps a list ofMetricProducers and automatically reads and exports the metrics every export interval. Metrics may also be dropped when it becomes time to export again, and there is an export in progress.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IntervalMetricReaderBuilderbuilder()Returns a newIntervalMetricReaderBuilderforIntervalMetricReader.io.opentelemetry.sdk.common.CompletableResultCodeshutdown()Stops the scheduled task and calls export one more time.IntervalMetricReaderstart()Starts thisIntervalMetricReaderto report to the configured exporter.
-
-
-
Method Detail
-
shutdown
public io.opentelemetry.sdk.common.CompletableResultCode shutdown()
Stops the scheduled task and calls export one more time.
-
builder
public static IntervalMetricReaderBuilder builder()
Returns a newIntervalMetricReaderBuilderforIntervalMetricReader.- Returns:
- a new
IntervalMetricReaderBuilderforIntervalMetricReader.
-
start
public IntervalMetricReader start()
Starts thisIntervalMetricReaderto report to the configured exporter.- Returns:
- this for fluent usage along with the builder.
-
-