← ZIO Kafka docs

zio.kafka.consumer.metrics

Members list

Type members

Classlikes

final case class ConsumerMetrics(pollCounter: Counter = ..., partitionsResumedInLatestPollGauge: Gauge[Int] = ..., partitionsPausedInLatestPollGauge: Gauge[Int] = ..., pollLatencyHistogram: Histogram[Duration] = ..., pollSizeHistogram: Histogram[Int] = ..., commitCounter: Counter = ..., commitLatencyHistogram: Histogram[Duration] = ..., aggregatedCommitCounter: Counter = ..., aggregatedCommitLatencyHistogram: Histogram[Duration] = ..., aggregatedCommitSizeHistogram: Histogram[Long] = ..., rebalanceCounter: Counter = ..., partitionsCurrentlyAssignedGauge: Gauge[Int] = ..., partitionsAssignedCounter: Counter = ..., partitionsRevokedCounter: Counter = ..., partitionsLostCounter: Counter = ..., pendingRequestsHistogram: Histogram[Int] = ..., pendingCommitsHistogram: Histogram[Int] = ..., queueSizeHistogram: Histogram[Int] = ..., queuePollsHistogram: Histogram[Int] = ..., allQueueSizeHistogram: Histogram[Int] = ..., subscriptionStateGauge: Gauge[Int] = ..., commandQueueSizeHistogram: Histogram[Int] = ..., commitQueueSizeHistogram: Histogram[Int] = ..., pollAuthErrorCounter: Counter = ...)

A description of all metrics that can be observed by the zio-kafka consumer.

A description of all metrics that can be observed by the zio-kafka consumer.

The purpose of this class is to be a repository of metrics names/descriptions/boundaries, which can optionally be updated by the user.

Instances of this class can be provided to implementations of ConsumerMetricsObserver. This can be either the built-in ZioMetricsConsumerMetricsObserver or an alternative metrics observer implemented with Micrometer, Dropwizard, etc.

Activate a custom ConsumerMetricsObserver with ConsumerSettings.withMetricsObserver.

WARNING: this is an UNSTABLE API and may change in an incompatible way without notice in any zio-kafka version.

Attributes

Companion
object
Source
ConsumerMetrics.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
ConsumerMetrics.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Companion
trait
Source
ConsumerMetricsObserver.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Implementations of this trait are responsible for observing consumer metrics and collect the measurements. The different methods are invoked from different places in the consumer.

Implementations of this trait are responsible for observing consumer metrics and collect the measurements. The different methods are invoked from different places in the consumer.

These methods hold up the consumer; they should return quickly or else throughput of the consumer will be affected.

Users can provide a custom implementation via zio.kafka.consumer.ConsumerSettings.withMetricsObserver.

WARNING: this is an UNSTABLE API and may change in an incompatible way without notice in any zio-kafka version.

Attributes

Companion
object
Source
ConsumerMetricsObserver.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class ZioMetricsConsumerMetricsObserver(consumerMetrics: ConsumerMetrics, metricLabels: Set[MetricLabel]) extends ConsumerMetricsObserver

A ConsumerMetricsObserver implementation that uses zio-metrics to collect observations.

A ConsumerMetricsObserver implementation that uses zio-metrics to collect observations.

Value parameters

consumerMetrics

the names, descriptions and histogram boundaries of all the metrics

metricLabels

the metric labels that are added to each metric

Attributes

Source
ZioMetricsConsumerMetricsObserver.scala
Supertypes
class Object
trait Matchable
class Any