metrics

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SocketName = "metrics.sock"
)

Variables

This section is empty.

Functions

func NewMetricsCollector added in v1.6.0

func NewMetricsCollector(socketBasePath, emptyDirBasePath, namespace, podName, podUID, volumeName string, labels map[string]string, clientset clientset.Interface) prometheus.Collector

NewMetricsCollector returns a new Collector exposing metrics read from the give path.

func ProcessMetricsData added in v1.6.0

func ProcessMetricsData(metricsReader io.Reader) (map[string]*dto.MetricFamily, error)

ProcessMetricsData processes metrics that follow Prometheus text format: https://prometheus.io/docs/instrumenting/exposition_formats/, returning its MetricFamily.

Types

type FakeMetricsManager added in v1.6.0

type FakeMetricsManager struct{}

func (*FakeMetricsManager) InitializeHTTPHandler added in v1.6.0

func (*FakeMetricsManager) InitializeHTTPHandler()

func (*FakeMetricsManager) RegisterMetricsCollector added in v1.6.0

func (*FakeMetricsManager) RegisterMetricsCollector(_, _, _, _ string)

func (*FakeMetricsManager) UnregisterMetricsCollector added in v1.6.0

func (*FakeMetricsManager) UnregisterMetricsCollector(_ string)

type Manager

type Manager interface {
	InitializeHTTPHandler()
	RegisterMetricsCollector(targetPath, podNamespace, podName, bucketName string)
	UnregisterMetricsCollector(targetPath string)
}

func NewMetricsManager

func NewMetricsManager(metricsEndpoint, fuseSocketDir string, clientset clientset.Interface) Manager

Jump to

Keyboard shortcuts

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