metrics

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: UPL-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PsrNamespace = "psr"
)

Variables

This section is empty.

Functions

func BuildMetricDescList

func BuildMetricDescList(metrics []*MetricItem, labels map[string]string, workerMetricsName string) []prometheus.Desc

func StartMetricsServerOrDie

func StartMetricsServerOrDie(providers []spi.WorkerMetricsProvider)

StartMetricsServerOrDie starts the metrics server. If there is an error the code exits

Types

type MetricItem

type MetricItem struct {
	Val         int64
	Desc        *prometheus.Desc
	Name        string
	Help        string
	Type        prometheus.ValueType
	ConstLabels prometheus.Labels
	VarLabels   []string
}

MetricItem contains the information for a single metric

func (*MetricItem) BuildMetric

func (m *MetricItem) BuildMetric() prometheus.Metric

BuildMetric builds the prometheus metrics from the MetricItem

func (*MetricItem) BuildMetricDesc

func (m *MetricItem) BuildMetricDesc(workerMetricsName string) *prometheus.Desc

BuildMetricDesc builds the MetricItem description from info about the metric and worker

Jump to

Keyboard shortcuts

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