Module: Datadog::Contrib::Kafka::Events::ConsumerGroup::Heartbeat

Extended by:
ConsumerEvent, ConsumerGroupEvent
Includes:
Datadog::Contrib::Kafka::Event
Defined in:
lib/ddtrace/contrib/kafka/events/consumer_group/heartbeat.rb

Overview

Defines instrumentation for heartbeat.consumer.kafka event

Constant Summary collapse

EVENT_NAME =
'heartbeat.consumer.kafka'.freeze

Class Method Summary collapse

Methods included from ConsumerEvent

process

Methods included from ConsumerGroupEvent

process

Methods included from Datadog::Contrib::Kafka::Event

included

Class Method Details

.process(span, _event, _id, payload) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/ddtrace/contrib/kafka/events/consumer_group/heartbeat.rb', line 20

def self.process(span, _event, _id, payload)
  super

  if payload.key?(:topic_partitions)
    payload[:topic_partitions].each do |topic, partitions|
      span.set_tag("#{Ext::TAG_TOPIC_PARTITIONS}.#{topic}", partitions)
    end
  end
end

.span_nameObject



32
33
34
# File 'lib/ddtrace/contrib/kafka/events/consumer_group/heartbeat.rb', line 32

def span_name
  Ext::SPAN_CONSUMER_HEARTBEAT
end