Sha256: b52a33f98477c2312728fe641bd0a88e17780d0f6d24a7dc90d12d35cc802f44

Contents?: true

Size: 758 Bytes

Versions: 15

Compression:

Stored size: 758 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 ReaderLoop module contains the instrumentation patch the ReaderLoop#run_once method
        module ReaderLoop
          def run_once
            attributes = OpenTelemetry::Instrumentation::Bunny::PatchHelpers.basic_attributes(nil, @transport, '', nil)
            tracer.in_span('Bunny::ReaderLoop#run_once', attributes: attributes, kind: :consumer) do
              super
            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/reader_loop.rb
opentelemetry-instrumentation-bunny-0.21.3 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.21.2 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.21.1 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.21.0 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.20.1 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.20.0 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.19.1 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.19.0 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.18.5 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.18.4 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.18.3 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.18.2 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.18.1 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb
opentelemetry-instrumentation-bunny-0.18.0 lib/opentelemetry/instrumentation/bunny/patches/reader_loop.rb