Sha256: bbda70ac90d01159de917540383177e959ce21bab39297940e8bec35890f5431

Contents?: true

Size: 657 Bytes

Versions: 22

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true

module Datadog
  module Tracing
    module Contrib
      module Qless
        # Shutdown Tracer in forks for performance reasons
        module TracerCleaner
          def around_perform(job)
            return super unless datadog_configuration && Tracing.enabled?

            super.tap do
              Tracing.shutdown! if forked?
            end
          end

          private

          def forked?
            Datadog.configuration_for(::Qless, :forked) == true
          end

          def datadog_configuration
            Datadog.configuration.tracing[:qless]
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ddtrace-1.23.3 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.23.2 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.23.1 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.22.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.21.1 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.21.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.20.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.19.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.18.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.17.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.16.2 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.16.1 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.16.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.15.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.14.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.13.1 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.13.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.12.1 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.12.0 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb
ddtrace-1.11.1 lib/datadog/tracing/contrib/qless/tracer_cleaner.rb