← ZIO Kafka docs

ProducerMetricsObserver

zio.kafka.producer.metrics.ProducerMetricsObserver
See theProducerMetricsObserver companion object

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

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

Users can provide a custom implementation via zio.kafka.producer.ProducerSettings.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
ProducerMetricsObserver.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def observeProduce(latency: Duration, batchSize: Int): UIO[Unit]

Attributes

Source
ProducerMetricsObserver.scala
def observeSendAuthError(errorCount: Int): UIO[Unit]

Attributes

Source
ProducerMetricsObserver.scala