Class IntervalMetricReader
java.lang.Object
io.opencensus.exporter.metrics.util.IntervalMetricReader
Wrapper of the
MetricReader which automatically reads and exports the metrics every
export interval.- Since:
- 0.19
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic IntervalMetricReadercreate(MetricExporter metricExporter, MetricReader metricReader, IntervalMetricReader.Options options) Creates a newIntervalMetricReader.voidReads and exports data immediately.voidstop()Stops the worker thread by callingThread.interrupt().
-
Method Details
-
create
public static IntervalMetricReader create(MetricExporter metricExporter, MetricReader metricReader, IntervalMetricReader.Options options) Creates a newIntervalMetricReader.- Parameters:
metricExporter- theMetricExporterto be called after.metricReader- theMetricReaderto be used to read metrics.options- theIntervalMetricReader.Optionsfor the newIntervalMetricReader.- Returns:
- a new
IntervalMetricReader. - Since:
- 0.19
-
readAndExportNow
public void readAndExportNow()Reads and exports data immediately.- Since:
- 0.19
-
stop
-