Module: Honeycomb::Rake::Task
- Defined in:
- lib/honeycomb/integrations/rake.rb
Overview
Automatically capture rake tasks and create a trace
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#honeycomb_client ⇒ Object
27 28 29 30 31 |
# File 'lib/honeycomb/integrations/rake.rb', line 27 def honeycomb_client return @honeycomb_client if defined?(@honeycomb_client) application.honeycomb_client end |
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 |