Class: NewRelic::MetricParser::External
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
#all? ⇒ Boolean
3
4
5
|
# File 'lib/new_relic/metric_parser/external.rb', line 3
def all?
host == 'all' || host == 'allWeb' || host == 'allOther'
end
|
#developer_name ⇒ Object
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/new_relic/metric_parser/external.rb', line 38
def developer_name
case
when all?
'All External'
when hosts_all?
host
when operation
"#{library}[#{host}]: #{operation}"
else
"#{library}[#{host}]"
end
end
|
#host ⇒ Object
9
10
11
|
# File 'lib/new_relic/metric_parser/external.rb', line 9
def host
segments[1]
end
|
#hosts_all? ⇒ Boolean
6
7
8
|
# File 'lib/new_relic/metric_parser/external.rb', line 6
def hosts_all?
library == 'all'
end
|
#legend_name ⇒ Object
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/new_relic/metric_parser/external.rb', line 18
def legend_name
case
when all?
"External Services"
when hosts_all?
"All #{host} calls"
else
developer_name
end
end
|
#library ⇒ Object
12
13
14
|
# File 'lib/new_relic/metric_parser/external.rb', line 12
def library
segments[2]
end
|
#operation ⇒ Object
15
16
17
|
# File 'lib/new_relic/metric_parser/external.rb', line 15
def operation
segments[3] && segments[3..-1].join("/")
end
|
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/new_relic/metric_parser/external.rb', line 28
def tooltip_name
case
when all?
"calls to external systems"
when hosts_all?
"calls to #{host}"
else
"calls to #{developer_name}"
end
end
|