Sha256: bbbc1f22be7fe6ce0cdc51ecd33733980b125337cb46fc832d294d219ee768c8

Contents?: true

Size: 733 Bytes

Versions: 30

Compression:

Stored size: 733 Bytes

Contents

# frozen_string_literal: true

require_relative '../patcher'
require_relative 'ext'
require_relative 'events'
require_relative 'log_injection'

module Datadog
  module Tracing
    module Contrib
      module ActiveJob
        # Patcher enables patching of 'active_job' module.
        module Patcher
          include Contrib::Patcher

          module_function

          def target_version
            Integration.version
          end

          def patch
            Events.subscribe!
            inject_log_correlation
          end

          def inject_log_correlation
            ::ActiveSupport.on_load(:active_job) do
              include LogInjection
            end
          end
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
ddtrace-1.19.0 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.18.0 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.17.0 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.16.2 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.16.1 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.16.0 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.15.0 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.14.0 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.13.1 lib/datadog/tracing/contrib/active_job/patcher.rb
ddtrace-1.13.0 lib/datadog/tracing/contrib/active_job/patcher.rb