registry

package
v0.0.0-...-ef45db5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Overview

Package registry holds a map of all metrics registered by the process.

This map is global and it is populated during init() time, when individual metrics are defined.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(m types.Metric)

Add adds a metric to the metric registry.

Panics if - the metric name is invalid. - a metric with the same name and target type is defined already. - a field name is invalid.

func Iter

func Iter(cb func(m types.Metric))

Iter calls a callback for each registered metric.

Metrics are visited in no particular order. The callback must not modify the registry.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL