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
- #action_exception_metric_names(txn) ⇒ Object
- #action_metric_names(txn, exception) ⇒ Object
- #aggregated_exception_metric_names(txn) ⇒ Object
- #aggregated_exception_type_count(exception, txn) ⇒ Object
- #aggregated_metric_names(txn) ⇒ Object
- #aggregated_type_count(exception, txn) ⇒ Object
Instance Method Details
#action_exception_metric_names(txn) ⇒ Object
89 90 91 |
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 89 def action_exception_metric_names(txn) "#{EXCEPTIONS_ACTION}#{txn.best_name}" end |
#action_metric_names(txn, exception) ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 62 def action_metric_names(txn,exception) names = ["#{ERRORS_ACTION}#{txn.best_name}"] if exception.respond_to? :tingyun_klass names << "#{ERRORS_ACTION}#{exception.tingyun_klass}" end names end |
#aggregated_exception_metric_names(txn) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 77 def aggregated_exception_metric_names(txn) metric_names = [EXCEPTIONS_ALL] return metric_names unless txn if TingYun::Agent::Transaction.recording_web_transaction? metric_names << EXCEPTIONS_ALL_WEB else metric_names << EXCEPTIONS_ALL_BACK_GROUND end metric_names end |
#aggregated_exception_type_count(exception, txn) ⇒ Object
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 93 def aggregated_exception_type_count(exception,txn) if exception.respond_to? :tingyun_klass names = ["#{EXCEPTIONS_TYPE}External #{exception.tingyun_code}/#{txn.best_name}"] names << "#{ERRORS_TYPE}#{exception.tingyun_code}/#{exception.tingyun_klass}" names << "#{ERRORS_ACTION}External/#{exception.tingyun_klass}" else names = ["#{EXCEPTIONS_TYPE}#{exception.class.to_s}/#{txn.best_name}"] end names end |
#aggregated_metric_names(txn) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 49 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 |
#aggregated_type_count(exception, txn) ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/ting_yun/agent/collector/error_collector.rb', line 70 def aggregated_type_count(exception,txn) names = ["#{ERRORS_TYPE}#{exception.class.to_s}/#{txn.best_name}"] if exception.respond_to? :tingyun_klass names << "#{ERRORS_TYPE}#{exception.tingyun_code}/#{exception.tingyun_klass}" end names end |