zio.kafka.producer.metrics.ProducerMetrics
See theProducerMetrics companion object
final case class ProducerMetrics(produceCallsCounter: Counter = ..., produceLatencyHistogram: Histogram[Duration] = ..., produceRecordsCounter: Counter = ..., produceBatchSizeHistogram: Histogram[Int] = ..., sendQueueSizeHistogram: Histogram[Int] = ..., sendQueueLatencyHistogram: Histogram[Duration] = ..., sendAuthErrorCounter: Counter = ...)
A description of all metrics that can be observed by the zio-kafka producer.
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 ProducerMetricsObserver. This can be either the built-in ZioMetricsProducerMetricsObserver or an alternative metrics observer implemented with Micrometer, Dropwizard, etc.
Activate a custom ProducerMetricsObserver with 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
- ProducerMetrics.scala
- Graph
-
- Supertypes
Members list
In this article