Skip to content

Commit 056a0fe

Browse files
committed
Push the aggregate message size to Datadog
It is nice to track how much data is being produced.
1 parent 9e43522 commit 056a0fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/kafka/datadog.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,12 @@ def produce_message(event)
229229
# This gets us the write rate.
230230
increment("producer.produce.messages", tags: tags.merge(topic: topic))
231231

232+
# Information about typical/average/95p message size.
232233
histogram("producer.produce.message_size", message_size, tags: tags.merge(topic: topic))
233234

235+
# Aggregate message size.
236+
count("producer.produce.message_size.sum", message_size, tags: tags.merge(topic: topic))
237+
234238
# This gets us the avg/max buffer size per producer.
235239
histogram("producer.buffer.size", buffer_size, tags: tags)
236240

0 commit comments

Comments
 (0)