← ZIO Kafka docs

ZioMetricsProducerMetricsObserver

zio.kafka.producer.metrics.ZioMetricsProducerMetricsObserver
final class ZioMetricsProducerMetricsObserver(producerMetrics: ProducerMetrics, metricLabels: Set[MetricLabel]) extends ProducerMetricsObserver

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

Value parameters

metricLabels

the metric labels that are added to each metric

producerMetrics

the names, descriptions and histogram boundaries of all the metrics

Attributes

Source
ZioMetricsProducerMetricsObserver.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(metricLabels: Set[MetricLabel])

A ProducerMetricsObserver implementation that uses zio-metrics to collect observations, using the default metric names, descriptions and histogram boundaries.

A ProducerMetricsObserver implementation that uses zio-metrics to collect observations, using the default metric names, descriptions and histogram boundaries.

Value parameters

metricLabels

the metric labels that are added to each metric

Attributes

Source
ZioMetricsProducerMetricsObserver.scala

Concrete methods

override def observeProduce(latency: Duration, batchSize: Int): UIO[Unit]
override def observeSendAuthError(errorCount: Int): UIO[Unit]
override def observeSendQueueSize(size: Int): UIO[Unit]
override def observeSendQueueTake(latency: Duration): UIO[Unit]