kafka

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerMetrics

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

func NewBrokerMetrics

func NewBrokerMetrics(m metrics.Metrics, opts ...Opt) *BrokerMetrics

func (*BrokerMetrics) Count

func (m *BrokerMetrics) Count(name string, value int64, tags []string)

func (*BrokerMetrics) Histogram

func (m *BrokerMetrics) Histogram(name string, value float64, tags []string)

func (*BrokerMetrics) Incr

func (m *BrokerMetrics) Incr(name string, tags []string)

func (*BrokerMetrics) OnBrokerConnect

func (b *BrokerMetrics) OnBrokerConnect(meta kgo.BrokerMetadata, dialDur time.Duration, conn net.Conn, err error)

func (*BrokerMetrics) OnBrokerDisconnect

func (b *BrokerMetrics) OnBrokerDisconnect(meta kgo.BrokerMetadata, conn net.Conn)

func (*BrokerMetrics) OnBrokerRead

func (b *BrokerMetrics) OnBrokerRead(
	meta kgo.BrokerMetadata,
	key int16,
	bytesRead int,
	readWait,
	timeToRead time.Duration,
	err error)

func (*BrokerMetrics) OnBrokerThrottle

func (b *BrokerMetrics) OnBrokerThrottle(
	meta kgo.BrokerMetadata,
	throttleInterval time.Duration,
	throttledAfterResponse bool)

func (*BrokerMetrics) OnBrokerWrite

func (b *BrokerMetrics) OnBrokerWrite(
	meta kgo.BrokerMetadata,
	key int16,
	bytesWritten int,
	writeWait,
	timeToWrite time.Duration,
	err error)

func (*BrokerMetrics) TimeInMilliseconds

func (m *BrokerMetrics) TimeInMilliseconds(name string, value float64, tags []string)

type ConsumerMetrics

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

func NewConsumerMetrics

func NewConsumerMetrics(m metrics.Metrics, opts ...Opt) *ConsumerMetrics

func (*ConsumerMetrics) Count

func (m *ConsumerMetrics) Count(name string, value int64, tags []string)

func (*ConsumerMetrics) Histogram

func (m *ConsumerMetrics) Histogram(name string, value float64, tags []string)

func (*ConsumerMetrics) Incr

func (m *ConsumerMetrics) Incr(name string, tags []string)

func (*ConsumerMetrics) OnFetchBatchRead

func (c *ConsumerMetrics) OnFetchBatchRead(
	meta kgo.BrokerMetadata,
	topic string, partition int32,
	metrics kgo.FetchBatchMetrics)

func (*ConsumerMetrics) OnFetchRecordBuffered

func (c *ConsumerMetrics) OnFetchRecordBuffered(record *kgo.Record)

func (*ConsumerMetrics) OnFetchRecordUnbuffered

func (c *ConsumerMetrics) OnFetchRecordUnbuffered(r *kgo.Record, polled bool)

func (*ConsumerMetrics) TimeInMilliseconds

func (m *ConsumerMetrics) TimeInMilliseconds(name string, value float64, tags []string)

type Opt

type Opt interface {
	// contains filtered or unexported methods
}

Opt applies options to the common metrics.

func WithSampleRate

func WithSampleRate(rate float64) Opt

WithSampleRate sets the sample rate which will be used when publishing metrics

func WithSampleRatesPerMetric

func WithSampleRatesPerMetric(ratesPerMetric map[string]float64) Opt

WithSampleRatesPerMetric sets the sample rate per metric name which will be used when publishing metrics

type ProducerMetrics

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

func NewProducerMetrics

func NewProducerMetrics(m metrics.Metrics, opts ...Opt) *ProducerMetrics

func (*ProducerMetrics) Count

func (m *ProducerMetrics) Count(name string, value int64, tags []string)

func (*ProducerMetrics) Histogram

func (m *ProducerMetrics) Histogram(name string, value float64, tags []string)

func (*ProducerMetrics) Incr

func (m *ProducerMetrics) Incr(name string, tags []string)

func (*ProducerMetrics) OnProduceBatchWritten

func (p *ProducerMetrics) OnProduceBatchWritten(
	meta kgo.BrokerMetadata,
	topic string,
	partition int32,
	metrics kgo.ProduceBatchMetrics)

func (*ProducerMetrics) OnProduceRecordBuffered

func (p *ProducerMetrics) OnProduceRecordBuffered(record *kgo.Record)

func (*ProducerMetrics) OnProduceRecordUnbuffered

func (p *ProducerMetrics) OnProduceRecordUnbuffered(record *kgo.Record, err error)

func (*ProducerMetrics) TimeInMilliseconds

func (m *ProducerMetrics) TimeInMilliseconds(name string, value float64, tags []string)

Jump to

Keyboard shortcuts

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