Module: Datadog::Tracing::Contrib::Qless::TracerCleaner

Defined in:
lib/datadog/tracing/contrib/qless/tracer_cleaner.rb

Overview

Shutdown Tracer in forks for performance reasons

Instance Method Summary collapse

Instance Method Details

#around_perform(job) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/datadog/tracing/contrib/qless/tracer_cleaner.rb', line 9

def around_perform(job)
  return super unless datadog_configuration && Tracing.enabled?

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