metrics

package
v1.0.0-beta.217 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {

	// Time since this client instance was created (microseconds)
	Age metric.Int64Gauge
	// Number of ops (callbacks, events, etc) waiting in queue for application to serve with rd_kafka_poll()
	ReplyQueue metric.Int64Gauge
	// Current number of messages in producer queues
	MessageCount metric.Int64Gauge
	// Current total size of messages in producer queues
	MessageSize metric.Int64Gauge
	// Total number of requests sent to Kafka brokers
	RequestsSent metric.Int64Gauge
	// Total number of bytes transmitted to Kafka brokers
	RequestsBytesSent metric.Int64Gauge
	// Total number of responses received from Kafka brokers
	RequestsReceived metric.Int64Gauge
	// Total number of bytes received from Kafka brokers
	RequestsBytesReceived metric.Int64Gauge
	// Total number of messages transmitted (produced) to Kafka brokers
	MessagesProduced metric.Int64Gauge
	// Total number of message bytes (including framing, such as per-Message framing and MessageSet/batch framing) transmitted to Kafka brokers
	MessagesBytesProduced metric.Int64Gauge
	// Total number of messages consumed, not including ignored messages (due to offset, etc), from Kafka brokers.
	MessagesConsumed metric.Int64Gauge
	// Total number of message bytes (including framing) received from Kafka brokers
	MessagesBytesConsumed metric.Int64Gauge
	// Number of topics in the metadata cache
	TopicsInMetadataCache metric.Int64Gauge
	// contains filtered or unexported fields
}

Metrics stores set of Kafka client related metrics See: https://github.com/confluentinc/librdkafka/blob/v2.4.0/STATISTICS.md

func New

func New(meter metric.Meter, opts ...Option) (*Metrics, error)

func (*Metrics) Add

func (m *Metrics) Add(ctx context.Context, stats *stats.Stats, attrs ...attribute.KeyValue)

type Option

type Option func(*Options)

func WithBrokerMetricsDisabled

func WithBrokerMetricsDisabled() Option

func WithConsumerGroupMetricsDisabled

func WithConsumerGroupMetricsDisabled() Option

func WithExtendedMetrics

func WithExtendedMetrics() Option

func WithTopicMetricsDisabled

func WithTopicMetricsDisabled() Option

type Options

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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