Back to godoc.org
go.opencensus.io / examples / derived_gauges

Command derived_gauges

v0.22.4
Latest Go to latest
Published: Jun 17, 2020 | License: Apache-2.0 | Module: go.opencensus.io

Overview

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier