Class QueueMetricProducer
java.lang.Object
io.opencensus.metrics.export.MetricProducer
io.opencensus.exporter.metrics.util.QueueMetricProducer
Wrapper of
MetricProducer which allows metrics to be pushed and buffered.- Since:
- 0.20
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic QueueMetricProducercreate(QueueMetricProducer.Options options) Creates a newQueueMetricProducer.Returns a collection of producedMetrics to be exported.voidpushMetrics(Collection<Metric> metrics) PushesMetrics to thisQueueMetricProducer.
-
Method Details
-
create
Creates a newQueueMetricProducer.- Parameters:
options- the options forQueueMetricProducer.- Returns:
- a
QueueMetricProducer. - Since:
- 0.20
-
pushMetrics
PushesMetrics to thisQueueMetricProducer.When buffer of this
QueueMetricProduceris full, the oldestMetrics will be dropped.- Parameters:
metrics-Metricsto be added to thisQueueMetricProducer.- Since:
- 0.20
-
getMetrics
Description copied from class:MetricProducerReturns a collection of producedMetrics to be exported.- Specified by:
getMetricsin classMetricProducer- Returns:
- a collection of produced
Metrics to be exported.
-