← ZIO Kafka docs

ConsumerMetricsObserver

zio.kafka.consumer.metrics.ConsumerMetricsObserver
See theConsumerMetricsObserver companion object

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
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def observeAggregatedCommit(latency: Duration, commitSize: Long): UIO[Unit]

Attributes

Source
ConsumerMetricsObserver.scala
def observeCommit(latency: Duration): UIO[Unit]

Attributes

Source
ConsumerMetricsObserver.scala
def observePoll(resumedCount: Int, pausedCount: Int, latency: Duration, pollSize: Int): UIO[Unit]

Attributes

Source
ConsumerMetricsObserver.scala
def observeRebalance(currentlyAssignedCount: Int, assignedCount: Int, revokedCount: Int, lostCount: Int): UIO[Unit]

Attributes

Source
ConsumerMetricsObserver.scala