class Doggerel
Constants
- VERSION
Attributes
aggregation_key[RW]
event_type[RW]
statsd[RW]
title[RW]
Public Class Methods
new(event_type, aggregation_key, title=nil, tags=[])
click to toggle source
# File lib/doggerel.rb, line 8 def initialize(event_type, aggregation_key, title=nil, tags=[]) @statsd = Statsd.new('localhost:8125') file = File.basename(__FILE__) if title.nil? @title = "#{event_type}::#{aggregation_key}::#{file}" else @title = title end @event_type = event_type @aggregation_key = aggregation_key end
Public Instance Methods
error(text=nil)
click to toggle source
# File lib/doggerel.rb, line 24 def error(text=nil) @statsd.event(@title, text, alert_type: 'error') end
info(text=nil)
click to toggle source
# File lib/doggerel.rb, line 20 def info(text=nil) @statsd.event(@title, text) end