Module: TingYun::Agent::Collector::ErrorCollector::Metric

Included in:
TingYun::Agent::Collector::ErrorCollector
Defined in:
lib/ting_yun/agent/collector/error_collector.rb

Instance Method Summary collapse

Instance Method Details

#action_metric_name(txn) ⇒ Object



57
58
59
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 57

def action_metric_name(txn)
  "#{ERRORS_ACTION}#{txn.best_name}" if txn
end

#aggregated_metric_names(txn) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 44

def aggregated_metric_names(txn)
  metric_names = [ERRORS_ALL]
  return metric_names unless txn

  if TingYun::Agent::Transaction.recording_web_transaction?
    metric_names << ERRORS_ALL_WEB
  else
    metric_names << ERRORS_ALL_BACK_GROUND
  end

  metric_names
end