Skip to content

Commit

Permalink
Merge pull request #273 from ocowchun/feature/add-category-to-newrelic
Browse files Browse the repository at this point in the history
Indicate that worker is a background task for NewRelic
  • Loading branch information
gabrieljoelc authored Apr 12, 2017
2 parents febf8d0 + 96bea2f commit a62fd59
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions examples/newrelic_metrics_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def work(msg)
logger.info "FOUND <#{title}>"
ack!
end
add_transaction_tracer :work, name: 'MetricsWorker', params: 'args[0]'

add_transaction_tracer :work, name: 'MetricsWorker', params: 'args[0]', category: :task

private

Expand All @@ -36,10 +36,5 @@ def extract_title(html)
end
end


r = Sneakers::Runner.new([ MetricsWorker ])
r.run




0 comments on commit a62fd59

Please sign in to comment.