kafkaprometheus

package
v4.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SlugSeparator = "$" // SlugSeparator is excluded by topicRegex.

Variables

This section is empty.

Functions

func SplitSlug

func SplitSlug(s string) (topic, eventName, groupID string)

ParseSlug returns topic, eventName, and groupID

Types

type DurationStats

type DurationStats struct {
	Avg   time.Duration `metric:"avg" type:"gauge"`
	Min   time.Duration `metric:"min" type:"gauge"`
	Max   time.Duration `metric:"max" type:"gauge"`
	Count int64         `metric:"count" type:"counter"`
	Sum   time.Duration `metric:"sum" type:"counter"`
}

type KafkaStatCollector

type KafkaStatCollector interface {
	GetStats() statistics.Stats
}

type ReaderCollector

type ReaderCollector struct {
	Client KafkaStatCollector
}

ReaderCollector implements prometheus' Collector interface, for kafka reader.

func (*ReaderCollector) Collect

func (r *ReaderCollector) Collect(metrics chan<- prometheus.Metric)

func (*ReaderCollector) Describe

func (r *ReaderCollector) Describe(c chan<- *prometheus.Desc)

type ReaderStat

type ReaderStat struct {
}

type SummaryStats

type SummaryStats struct {
	Avg   int64 `metric:"avg" type:"gauge"`
	Min   int64 `metric:"min" type:"gauge"`
	Max   int64 `metric:"max" type:"gauge"`
	Count int64 `metric:"count" type:"counter"`
	Sum   int64 `metric:"sum" type:"counter"`
}

type WriterCollector

type WriterCollector struct {
	Client KafkaStatCollector
}

WriterCollector implements prometheus' Collector interface, for kafka writer.

func (*WriterCollector) Collect

func (w *WriterCollector) Collect(metrics chan<- prometheus.Metric)

func (*WriterCollector) Describe

func (w *WriterCollector) Describe(c chan<- *prometheus.Desc)

Jump to

Keyboard shortcuts

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