metrics

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	TMIMsgsCount              Observer
	TMICommandCount           Observer
	LearnedCount              Observer
	ForgotCount               Observer
	SpeakLatency              Observer
	LearnLatency              Observer
	UsedMessagesForGeneration Observer
	TMISendWait               Observer
}

func (Metrics) Collectors

func (m Metrics) Collectors() []prometheus.Collector

type Observer

type Observer interface {
	Observe(val float64, labels ...string)

	// for now we will tightly couple to the prometheus collector type
	// the go otel metrics sdk also has a prometheus adapter that implements this interface.
	prometheus.Collector
}

func NewPromCounter

func NewPromCounter(m prometheus.Counter) Observer

func NewPromGauge

func NewPromGauge(m prometheus.Counter) Observer

func NewPromHistogram

func NewPromHistogram(m prometheus.Histogram) Observer

func NewPromObserverVec

func NewPromObserverVec(m prometheus.ObserverVec) Observer

for histogram or summary vecs

type PrometheusMetric

type PrometheusMetric struct {
	prometheus.Collector
	// contains filtered or unexported fields
}

func (*PrometheusMetric) Observe

func (m *PrometheusMetric) Observe(val float64, labels ...string)

Jump to

Keyboard shortcuts

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