Sha256: 4e0788106a29d763f96480e6fa3ad24303d48172f3b55273279a11907ff83428

Contents?: true

Size: 784 Bytes

Versions: 10

Compression:

Stored size: 784 Bytes

Contents

# frozen_string_literal: true

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

require_relative '../context_composite_executor_service'

module OpenTelemetry
  module Instrumentation
    module ConcurrentRuby
      module Patches
        # Concurrent::Future patch for instrumentation
        module Future
          def self.included(base)
            base.class_eval do
              alias_method :ns_initialize_without_otel, :ns_initialize
              remove_method(:ns_initialize)

              def ns_initialize(value, opts)
                ns_initialize_without_otel(value, opts)

                @executor = ContextCompositeExecutorService.new(@executor)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-concurrent_ruby-0.18.2 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.18.1 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.18.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.17.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.16.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.15.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.14.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.13.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.12.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
opentelemetry-instrumentation-concurrent_ruby-0.11.0 lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb