package metricproducer
Import Path
go.opencensus.io/metric/metricproducer (on go.dev)
Dependency Relation
imports 2 packages, and imported by 2 packages
Package-Level Type Names (total 2, both are exported)
Manager maintains a list of active producers. Producers can register
with the manager to allow readers to read all metrics provided by them.
Readers can retrieve all producers registered with the manager,
read metrics from the producers and export them.
mu sync.RWMutex
producers map[Producer]struct{}
AddProducer adds the producer to the Manager if it is not already present.
DeleteProducer deletes the producer from the Manager if it is present.
GetAll returns a slice of all producer currently registered with
the Manager. For each call it generates a new slice. The slice
should not be cached as registration may change at any time. It is
typically called periodically by exporter to read metrics from
the producers.
func GlobalManager() *Manager
var prodMgr *Manager
Producer is a source of metrics.
Read should return the current values of all metrics supported by this
metric provider.
The returned metrics should be unique for each combination of name and
resource.
*go.opencensus.io/stats/view.worker
func (*Manager).GetAll() []Producer
func (*Manager).AddProducer(producer Producer)
func (*Manager).DeleteProducer(producer Producer)
Package-Level Functions (only one, which is exported)
GlobalManager is a single instance of producer manager
that is used by all producers and all readers.
Package-Level Variables (total 2, neither is exported)
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |