brod_metrics (brod v4.6.2)
View SourceTelemetry events emitted by brod.
Brod emits events using the Beam Telemetry library. Users can attach handler functions to these events, for example to report metrics. Each event is emitted by a function in this module; see the function documentation for the measurements and metadata attached to each event.
Summary
Functions
Emit a [brod, produce_request_sent] event.
Types
-type batch_input() :: brod:batch_input().
-type partition() :: brod:partition().
-type topic() :: brod:topic().
Functions
-spec produce_request_sent(topic(), partition(), batch_input()) -> ok.
Emit a [brod, produce_request_sent] event.
Emitted by producers for each produce request successfully sent on wire, i.e. one event per Kafka produce request (message batch).
Note that retried batches emit the event again: the event counts wire sends, so a summed count can exceed the number of unique messages produced when retries occur.
Measurements:
count: number of messages in the request.bytes: total size of keys, values and headers of the messages in the request (before encoding and compression), plus 8 bytes per message accounting for the timestamp.
Metadata: topic and partition the request was sent to.