Class: Metrux::Commands::NoticeError

Inherits:
Base
  • Object
show all
Defined in:
lib/metrux/commands/notice_error.rb

Constant Summary collapse

ERROR_METER_KEY =
'meters/errors'.freeze

Constants inherited from Base

Base::DEFAULT_TAGS

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Metrux::Commands::Base

Instance Method Details

#execute(error, payload = {}) ⇒ Object



6
7
8
9
10
11
# File 'lib/metrux/commands/notice_error.rb', line 6

def execute(error, payload = {})
  value = build_value(error)
  options = build_options(error, payload)

  write(ERROR_METER_KEY, format_data(value, options))
end