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 ¶
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 ¶
Iter calls a callback for each registered metric.
Metrics are visited in no particular order. The callback must not modify the registry.
func ValidateMetricFieldName ¶
ValidateMetricFieldName validates a metric field name.
func ValidateMetricName ¶
ValidateMetricName validates the provided metric name. * if the provided name starts with "/", validate it as is; * otherwise prepend monitor.MetricNamePrefix to it then validate.
Types ¶
This section is empty.