internal

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeMetricFamilies

func NormalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily) []*dto.MetricFamily

NormalizeMetricFamilies returns a MetricFamily slice with empty MetricFamilies pruned and the remaining MetricFamilies sorted by name within the slice, with the contained Metrics sorted within each MetricFamily.

func RuntimeMetricsToProm added in v0.12.1

func RuntimeMetricsToProm(d *metrics.Description) (string, string, string, bool)

RuntimeMetricsToProm produces a Prometheus metric name from a runtime/metrics metric description and validates whether the metric is suitable for integration with Prometheus.

Returns false if a name could not be produced, or if Prometheus does not understand the runtime/metrics Kind.

Note that the main reason a name couldn't be produced is if the runtime/metrics package exports a name with characters outside the valid Prometheus metric name character set. This is theoretically possible, but should never happen in practice. Still, don't rely on it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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