Module: Datadog::Contrib::Rake::Patcher
- Includes:
- Patcher
- Defined in:
- lib/ddtrace/contrib/rake/patcher.rb
Overview
Patcher enables patching of ‘rake’ module.
Class Method Summary collapse
Methods included from Patcher
Class Method Details
.get_option(option) ⇒ Object
30 31 32 |
# File 'lib/ddtrace/contrib/rake/patcher.rb', line 30 def get_option(option) Datadog.configuration[:rake].get_option(option) end |
.patch ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ddtrace/contrib/rake/patcher.rb', line 19 def patch do_once(:rake) do begin # Add instrumentation patch to Rake task ::Rake::Task.send(:include, Instrumentation) rescue StandardError => e Datadog::Tracer.log.error("Unable to apply Rake integration: #{e}") end end end |
.patched? ⇒ Boolean
15 16 17 |
# File 'lib/ddtrace/contrib/rake/patcher.rb', line 15 def patched? done?(:rake) end |