Module: Datadog::Tracing::Contrib::DelayedJob::Patcher
- Includes:
- Patcher
- Defined in:
- lib/datadog/tracing/contrib/delayed_job/patcher.rb
Overview
Patcher enables patching of ‘delayed_job’ module.
Class Method Summary collapse
- .add_instrumentation(klass) ⇒ Object
- .patch ⇒ Object
- .patch_server_internals ⇒ Object
- .target_version ⇒ Object
Methods included from Patcher
Class Method Details
.add_instrumentation(klass) ⇒ Object
25 26 27 |
# File 'lib/datadog/tracing/contrib/delayed_job/patcher.rb', line 25 def add_instrumentation(klass) klass.plugins << Plugin end |
.patch ⇒ Object
19 20 21 22 23 |
# File 'lib/datadog/tracing/contrib/delayed_job/patcher.rb', line 19 def patch require_relative 'plugin' add_instrumentation(::Delayed::Worker) patch_server_internals end |
.patch_server_internals ⇒ Object
29 30 31 32 |
# File 'lib/datadog/tracing/contrib/delayed_job/patcher.rb', line 29 def patch_server_internals require_relative 'server_internal_tracer/worker' ::Delayed::Worker.prepend(ServerInternalTracer::Worker) end |
.target_version ⇒ Object
15 16 17 |
# File 'lib/datadog/tracing/contrib/delayed_job/patcher.rb', line 15 def target_version Integration.version end |