module OpenTelemetry::Instrumentation::Bunny::Patches::Queue

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

Public Instance Methods

pop(opts = { manual_ack: false }) { |delivery_info, properties, payload| ... } click to toggle source
Calls superclass method
# 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

Private Instance Methods

tracer() click to toggle source
# File lib/opentelemetry/instrumentation/bunny/patches/queue.rb, line 25
def tracer
  Bunny::Instrumentation.instance.tracer
end