Documentation ¶
Index ¶
- type BrokerMetrics
- func (m *BrokerMetrics) Count(name string, value int64, tags []string)
- func (m *BrokerMetrics) Histogram(name string, value float64, tags []string)
- func (m *BrokerMetrics) Incr(name string, tags []string)
- func (b *BrokerMetrics) OnBrokerConnect(meta kgo.BrokerMetadata, dialDur time.Duration, conn net.Conn, err error)
- func (b *BrokerMetrics) OnBrokerDisconnect(meta kgo.BrokerMetadata, conn net.Conn)
- func (b *BrokerMetrics) OnBrokerRead(meta kgo.BrokerMetadata, key int16, bytesRead int, ...)
- func (b *BrokerMetrics) OnBrokerThrottle(meta kgo.BrokerMetadata, throttleInterval time.Duration, ...)
- func (b *BrokerMetrics) OnBrokerWrite(meta kgo.BrokerMetadata, key int16, bytesWritten int, ...)
- func (m *BrokerMetrics) TimeInMilliseconds(name string, value float64, tags []string)
- type ConsumerMetrics
- func (m *ConsumerMetrics) Count(name string, value int64, tags []string)
- func (m *ConsumerMetrics) Histogram(name string, value float64, tags []string)
- func (m *ConsumerMetrics) Incr(name string, tags []string)
- func (c *ConsumerMetrics) OnFetchBatchRead(meta kgo.BrokerMetadata, topic string, partition int32, ...)
- func (c *ConsumerMetrics) OnFetchRecordBuffered(record *kgo.Record)
- func (c *ConsumerMetrics) OnFetchRecordUnbuffered(r *kgo.Record, polled bool)
- func (m *ConsumerMetrics) TimeInMilliseconds(name string, value float64, tags []string)
- type Opt
- type ProducerMetrics
- func (m *ProducerMetrics) Count(name string, value int64, tags []string)
- func (m *ProducerMetrics) Histogram(name string, value float64, tags []string)
- func (m *ProducerMetrics) Incr(name string, tags []string)
- func (p *ProducerMetrics) OnProduceBatchWritten(meta kgo.BrokerMetadata, topic string, partition int32, ...)
- func (p *ProducerMetrics) OnProduceRecordBuffered(record *kgo.Record)
- func (p *ProducerMetrics) OnProduceRecordUnbuffered(record *kgo.Record, err error)
- func (m *ProducerMetrics) TimeInMilliseconds(name string, value float64, tags []string)
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) 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 ¶
type ConsumerMetrics ¶
type ConsumerMetrics struct {
// contains filtered or unexported fields
}
func NewConsumerMetrics ¶
func NewConsumerMetrics(m metrics.Metrics, opts ...Opt) *ConsumerMetrics
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 ¶
type Opt ¶
type Opt interface {
// contains filtered or unexported methods
}
Opt applies options to the common metrics.
func WithSampleRate ¶
WithSampleRate sets the sample rate which will be used when publishing metrics
func WithSampleRatesPerMetric ¶
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) 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 ¶
Click to show internal directories.
Click to hide internal directories.