Module: OpenTelemetry::Instrumentation::Bunny::Patches::Queue

Defined in:
lib/opentelemetry/instrumentation/bunny/patches/queue.rb

Overview

The Queue module contains the instrumentation patch the Queue#pop method.

Instance Method Summary collapse

Instance Method Details

#pop(opts = { manual_ack: false }, &block) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/opentelemetry/instrumentation/bunny/patches/queue.rb', line 13

def pop(opts = { manual_ack: false }, &block)
  return super unless block

  super do |delivery_info, properties, payload|
    OpenTelemetry::Instrumentation::Bunny::PatchHelpers.with_process_span(channel, tracer, delivery_info, properties) do
      yield delivery_info, properties, payload
    end
  end
end