Sha256: 19516da3d2b299568476af35d305cbde459978dcadb4f8ebf3f1755815bbe6f4
Contents?: true
Size: 1.25 KB
Versions: 24
Compression:
Stored size: 1.25 KB
Contents
require_relative '../../ext' require_relative '../../event' require_relative '../../consumer_event' require_relative '../../consumer_group_event' module Datadog module Tracing module Contrib module Kafka module Events module ConsumerGroup # Defines instrumentation for heartbeat.consumer.kafka event module Heartbeat include Kafka::Event extend Kafka::ConsumerEvent extend Kafka::ConsumerGroupEvent EVENT_NAME = 'heartbeat.consumer.kafka'.freeze 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 module_function def span_name Ext::SPAN_CONSUMER_HEARTBEAT end def span_options super.merge({ tags: { Tracing::Metadata::Ext::TAG_OPERATION => Ext::TAG_OPERATION_CONSUMER_HEARTBEAT } }) end end end end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems