Class: Blabbermouth::Bystanders::NewRelic
- Inherits:
-
Base
- Object
- Base
- Blabbermouth::Bystanders::NewRelic
- Defined in:
- lib/blabbermouth/new_relic/bystander.rb
Instance Method Summary collapse
- #count(key, total, *args) ⇒ Object
- #error(key, e, *args) ⇒ Object
- #increment(key, by = 1, *args) ⇒ Object
- #info(key, msg = nil, *args) ⇒ Object
- #time(key, duration = nil, *args) ⇒ Object
Instance Method Details
#count(key, total, *args) ⇒ Object
16 17 18 |
# File 'lib/blabbermouth/new_relic/bystander.rb', line 16 def count(key, total, *args) ::NewRelic::Agent.record_metric(key, total) end |
#error(key, e, *args) ⇒ Object
4 5 6 |
# File 'lib/blabbermouth/new_relic/bystander.rb', line 4 def error(key, e, *args) ::NewRelic::Agent.notice_error(e, (args. || {}).merge(key: key)) end |
#increment(key, by = 1, *args) ⇒ Object
12 13 14 |
# File 'lib/blabbermouth/new_relic/bystander.rb', line 12 def increment(key, by=1, *args) ::NewRelic::Agent.increment_metric(key, by) end |
#info(key, msg = nil, *args) ⇒ Object
8 9 10 |
# File 'lib/blabbermouth/new_relic/bystander.rb', line 8 def info(key, msg=nil, *args) ::NewRelic::Agent.record_custom_event(key, (args. || {}).merge({message: msg})) end |
#time(key, duration = nil, *args) ⇒ Object
20 21 22 |
# File 'lib/blabbermouth/new_relic/bystander.rb', line 20 def time(key, duration=nil, *args) ::NewRelic::Agent.record_custom_event(key, (args. || {}).merge({duration: duration})) end |