Class: Kafka::Datadog::FetcherSubscriber

Inherits:
StatsdSubscriber
  • Object
show all
Defined in:
lib/kafka/datadog.rb

Instance Method Summary collapse

Instance Method Details

#loop(event) ⇒ Object


399
400
401
402
403
404
405
406
407
408
# File 'lib/kafka/datadog.rb', line 399

def loop(event)
  queue_size = event.payload.fetch(:queue_size)

  tags = {
    client: event.payload.fetch(:client_id),
    group_id: event.payload.fetch(:group_id),
  }

  gauge("fetcher.queue_size", queue_size, tags: tags)
end