metrics

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client = Metrics{}
)

Functions

func InitMetrics

func InitMetrics(config types.Config, rmgr resource.Manager, metricsDescriptions []*plugintypes.MetricsDescription) error

InitMetrics builds the global metrics client and registers its collectors.

Types

type Metrics

type Metrics struct {
	Config types.Config

	StatsdAddr string
	Hostname   string

	Collectors map[string]prometheus.Collector
	// contains filtered or unexported fields
}

Metrics ships core metrics to Prometheus and statsd.

func (*Metrics) RemoveInvalidNodes

func (m *Metrics) RemoveInvalidNodes(invalidNode string)

RemoveInvalidNodes drops Prometheus label sets for a node that no longer exists.

func (*Metrics) ResourceMiddleware

func (m *Metrics) ResourceMiddleware(cluster cluster.Cluster) func(http.Handler) http.Handler

ResourceMiddleware refreshes node metrics before the wrapped handler runs.

func (*Metrics) SendDeployCount

func (m *Metrics) SendDeployCount(ctx context.Context, n int)

func (*Metrics) SendMetrics

func (m *Metrics) SendMetrics(ctx context.Context, metrics ...*plugintypes.Metrics)

func (*Metrics) SendNodeMetrics added in v0.1.1

func (m *Metrics) SendNodeMetrics(ctx context.Context, node *types.Node)

SendNodeMetrics refreshes a node's resource metrics and pushes them.

func (*Metrics) SendPodNodeStatus

func (m *Metrics) SendPodNodeStatus(ctx context.Context, node *types.Node)

Jump to

Keyboard shortcuts

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