Class: NewRelic::MetricParser::ActiveRecord
Constant Summary
SEPARATOR
Instance Attribute Summary
#name
Instance Method Summary
collapse
#apdex_metric_path, #base_metric_name, #call_rate_suffix, #category, for_metric_named, #initialize, #is_controller?, #is_transaction?, #last_segment, #method_missing, parse, #pie_chart_label, #segment_0, #segment_1, #segment_2, #segment_3, #segment_4, #segment_5, #segments, #short_name, #summary_metrics, #url
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class NewRelic::MetricParser
Instance Method Details
#developer_name ⇒ Object
25
26
27
|
# File 'lib/new_relic/metric_parser/active_record.rb', line 25
def developer_name
"#{model_class}##{segments.last}"
end
|
#is_active_record? ⇒ Boolean
2
|
# File 'lib/new_relic/metric_parser/active_record.rb', line 2
def is_active_record? ; true; end
|
#is_database? ⇒ Boolean
8
9
10
|
# File 'lib/new_relic/metric_parser/active_record.rb', line 8
def is_database?
true
end
|
#legend_name ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/new_relic/metric_parser/active_record.rb', line 11
def legend_name
if name == 'ActiveRecord/all'
'Database'
else
super
end
end
|
#model_class ⇒ Object
4
5
6
|
# File 'lib/new_relic/metric_parser/active_record.rb', line 4
def model_class
return segments[1]
end
|
18
19
20
21
22
23
24
|
# File 'lib/new_relic/metric_parser/active_record.rb', line 18
def tooltip_name
if name == 'ActiveRecord/all'
'all SQL execution'
else
super
end
end
|