Module: Honeycomb::Rake::Task

Defined in:
lib/honeycomb/integrations/rake.rb

Overview

Automatically capture rake tasks and create a trace

Instance Method Summary collapse

Instance Method Details

#execute(args = nil) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/honeycomb/integrations/rake.rb', line 13

def execute(args = nil)
  return super(args) if honeycomb_client.nil?

  honeycomb_client.start_span(name: "rake.#{name}") do |span|
    span.add_field("meta.package", "rake")
    span.add_field("meta.package_version", ::Rake::VERSION)
    full_comment && span.add_field("rake.description", full_comment)
    arg_description && span.add_field("rake.arguments", arg_description)
    super(args)
  end
end

#honeycomb_clientObject



25
26
27
# File 'lib/honeycomb/integrations/rake.rb', line 25

def honeycomb_client
  application.honeycomb_client
end