go.opencensus.io: go.opencensus.io/examples/derived_gauges Files

Command derived_gauges

This example demonstrates the use of derived gauges. It is a simple interactive program of consumer and producer. User can input number of items to produce. Producer produces specified number of items. Consumer randomly consumes 1-5 items in each attempt. It then sleeps randomly between 1-10 seconds before the next attempt. Two metrics collected to monitor the queue.

Metrics

* queue_size: It is an instantaneous queue size represented using derived gauge int64.

* queue_seconds_since_processed_last: It is the time elaspsed in seconds since the last time when the queue was consumed. It is represented using derived gauge float64.

Package Files

derived_gauge.go

Package main imports 13 packages (graph). Updated 2019-05-01. Refresh now. Tools for package owners.