module Datadog::Contrib::ConcurrentRuby::FuturePatch
This patches the Future - to wrap executor service using ContextCompositeExecutorService
Public Class Methods
included(base)
click to toggle source
# File lib/ddtrace/contrib/concurrent_ruby/future_patch.rb, line 9 def self.included(base) base.class_eval do alias_method :ns_initialize_without_datadog, :ns_initialize remove_method(:ns_initialize) def ns_initialize(value, opts) ns_initialize_without_datadog(value, opts) @executor = ContextCompositeExecutorService.new(@executor) end end end
Public Instance Methods
ns_initialize(value, opts)
click to toggle source
# File lib/ddtrace/contrib/concurrent_ruby/future_patch.rb, line 14 def ns_initialize(value, opts) ns_initialize_without_datadog(value, opts) @executor = ContextCompositeExecutorService.new(@executor) end