metrics

package
v0.0.0-...-985b9d9 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector manages all Kafka configuration metrics

func NewCollector

func NewCollector() *Collector

NewCollector creates and initializes a new Collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector

func (*Collector) GetMetricByKey

func (c *Collector) GetMetricByKey(configKey string) string

GetMetricByKey returns the metric name for a given Kafka config key

func (*Collector) Reset

func (c *Collector) Reset()

Reset safely resets all metrics

func (*Collector) SetMetric

func (c *Collector) SetMetric(name, topic, cluster string, value float64)

SetMetric safely sets a metric value

type MetricDefinition

type MetricDefinition struct {
	Name      string
	Help      string
	ConfigKey string
}

MetricDefinition represents a single metric configuration

Jump to

Keyboard shortcuts

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