metrics

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	METRICS_SPLIT        = "|||"
	METRICS_COUNTER_TAIL = "count"
	METRICS_GAUGE_TAIL   = "gauge"
	METRICS_HIST_TAIL    = "hist"
	METRICS_SUMMARY_TAIL = "summary"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	CountTotal       *prometheus.CounterVec
	ParseErrorsTotal prometheus.Counter
	OthersMetrics    map[string]prometheus.Collector
}

Collection is a struct containing pointers to all metrics that should be exposed to Prometheus

func (*Collection) Init

func (m *Collection) Init(cfg *config.NamespaceConfig)

Init initializes a metrics struct

func (*Collection) MustRegister

func (c *Collection) MustRegister(r *prometheus.Registry)

type NamespaceMetrics

type NamespaceMetrics struct {
	Collection
	// contains filtered or unexported fields
}

func NewForNamespace

func NewForNamespace(cfg *config.NamespaceConfig) *NamespaceMetrics

func (*NamespaceMetrics) Gatherer

func (m *NamespaceMetrics) Gatherer() prometheus.Gatherer

Jump to

Keyboard shortcuts

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