Sha256: 733859f815e15789e15823de1c1109db168972e04ef9ccc0a0c4e183fb53b00e

Contents?: true

Size: 834 Bytes

Versions: 15

Compression:

Stored size: 834 Bytes

Contents

# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

module OpenTelemetry
  module Instrumentation
    module Bunny
      module Patches
        # The Queue module contains the instrumentation patch the Queue#pop method.
        module Queue
          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

          def tracer
            Bunny::Instrumentation.instance.tracer
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-bunny-0.21.4 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.21.3 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.21.2 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.21.1 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.21.0 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.20.1 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.20.0 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.19.1 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.19.0 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.18.5 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.18.4 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.18.3 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.18.2 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.18.1 lib/opentelemetry/instrumentation/bunny/patches/queue.rb
opentelemetry-instrumentation-bunny-0.18.0 lib/opentelemetry/instrumentation/bunny/patches/queue.rb