Sha256: 9b37ec4579c536ea8f48a4fd7bf0ac0e566b19dd29df2fcf5edaff23fba731a9

Contents?: true

Size: 868 Bytes

Versions: 16

Compression:

Stored size: 868 Bytes

Contents

require 'ddtrace/contrib/kafka/ext'
require 'ddtrace/contrib/kafka/event'

module Datadog
  module Contrib
    module Kafka
      module Events
        module ProduceOperation
          # Defines instrumentation for send_messages.producer.kafka event
          module SendMessages
            include Kafka::Event

            EVENT_NAME = 'send_messages.producer.kafka'.freeze

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

              span.set_tag(Ext::TAG_MESSAGE_COUNT, payload[:message_count]) if payload.key?(:message_count)
              span.set_tag(Ext::TAG_SENT_MESSAGE_COUNT, payload[:sent_message_count]) if payload.key?(:sent_message_count)
            end

            module_function

            def span_name
              Ext::SPAN_SEND_MESSAGES
            end
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
ddtrace-0.51.1 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.51.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.50.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.49.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.48.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.47.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.46.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.45.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.44.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.43.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.42.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.41.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ls-trace-0.2.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.40.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.39.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb
ddtrace-0.38.0 lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb