module Honeycomb::Rake::Task

Automatically capture rake tasks and create a trace

Public Instance Methods

execute(args = nil) click to toggle source
Calls superclass method
# 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_client() click to toggle source
# File lib/honeycomb/integrations/rake.rb, line 25
def honeycomb_client
  application.honeycomb_client
end