Module: Datadog::Tracing::Contrib::Rake::Instrumentation::InstanceMethods
- Defined in:
- lib/datadog/tracing/contrib/rake/instrumentation.rb
Overview
Instance methods for Rake instrumentation
Instance Method Summary collapse
Instance Method Details
#execute(args = nil) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/datadog/tracing/contrib/rake/instrumentation.rb', line 31 def execute(args = nil) return super if !enabled? || !instrumented_task? Tracing.trace(Ext::SPAN_EXECUTE, **) do |span| annotate_execute!(span, args) super end ensure shutdown_tracer! end |
#invoke(*args) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/datadog/tracing/contrib/rake/instrumentation.rb', line 20 def invoke(*args) return super if !enabled? || !instrumented_task? Tracing.trace(Ext::SPAN_INVOKE, **) do |span| annotate_invoke!(span, args) super end ensure shutdown_tracer! end |