Sha256: a93f84976d07e5dc2913106a138631bbedd3fa276593892adffcc907953b7c15

Contents?: true

Size: 560 Bytes

Versions: 12

Compression:

Stored size: 560 Bytes

Contents

# typed: false

module Datadog
  module Tracing
    module Contrib
      module ActiveJob
        # Active Job log injection wrapped around job execution
        module LogInjection
          def self.included(base)
            base.class_eval do
              around_perform do |_, block|
                if logger.respond_to?(:tagged)
                  logger.tagged(Tracing.log_correlation, &block)
                else
                  block.call
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ddtrace-1.9.0 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.8.0 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.7.0 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.6.1 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.6.0 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.5.2 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.5.1 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.5.0 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.4.2 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.4.1 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.4.0 lib/datadog/tracing/contrib/active_job/log_injection.rb
ddtrace-1.3.0 lib/datadog/tracing/contrib/active_job/log_injection.rb