newrelic_rpm 4.0.0.332 → 4.1.0.333
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +0 -1
- data/CHANGELOG.md +22 -0
- data/LICENSE +1 -27
- data/README.md +4 -57
- data/lib/new_relic/agent.rb +0 -1
- data/lib/new_relic/agent/attribute_filter.rb +0 -1
- data/lib/new_relic/agent/configuration/default_source.rb +3 -32
- data/lib/new_relic/agent/error_collector.rb +0 -2
- data/lib/new_relic/agent/http_clients/curb_wrappers.rb +1 -1
- data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +1 -1
- data/lib/new_relic/agent/http_clients/uri_util.rb +12 -7
- data/lib/new_relic/agent/stats.rb +0 -14
- data/lib/new_relic/agent/stats_engine.rb +171 -3
- data/lib/new_relic/agent/supported_versions.rb +9 -9
- data/lib/new_relic/agent/traced_method_stack.rb +1 -1
- data/lib/new_relic/agent/transaction/attributes.rb +0 -2
- data/lib/new_relic/agent/transaction/external_request_segment.rb +1 -5
- data/lib/new_relic/agent/transaction/trace_node.rb +0 -10
- data/lib/new_relic/agent/transaction_sample_builder.rb +0 -3
- data/lib/new_relic/agent/transaction_sampler.rb +3 -13
- data/lib/new_relic/collection_helper.rb +0 -18
- data/lib/new_relic/control/frameworks/rails.rb +1 -21
- data/lib/new_relic/control/frameworks/rails3.rb +1 -1
- data/lib/new_relic/noticed_error.rb +1 -0
- data/lib/new_relic/version.rb +1 -1
- data/newrelic.yml +0 -4
- data/newrelic_rpm.gemspec +1 -1
- data/test/config/newrelic.yml +1 -1
- data/test/multiverse/lib/multiverse/runner.rb +9 -1
- data/test/multiverse/suites/active_record/config/newrelic.yml +0 -1
- data/test/multiverse/suites/agent_only/config/newrelic.yml +0 -1
- data/test/multiverse/suites/capistrano/config/newrelic.yml +0 -1
- data/test/multiverse/suites/capistrano2/config/newrelic.yml +0 -1
- data/test/multiverse/suites/curb/config/newrelic.yml +0 -1
- data/test/multiverse/suites/datamapper/config/newrelic.yml +0 -1
- data/test/multiverse/suites/deferred_instrumentation/config/newrelic.yml +0 -1
- data/test/multiverse/suites/delayed_job/config/newrelic.yml +0 -1
- data/test/multiverse/suites/excon/config/newrelic.yml +0 -1
- data/test/multiverse/suites/grape/config/newrelic.yml +0 -1
- data/test/multiverse/suites/high_security/config/newrelic.yml +0 -1
- data/test/multiverse/suites/httpclient/config/newrelic.yml +0 -1
- data/test/multiverse/suites/httprb/config/newrelic.yml +0 -1
- data/test/multiverse/suites/json/config/newrelic.yml +0 -1
- data/test/multiverse/suites/marshalling/config/newrelic.yml +0 -1
- data/test/multiverse/suites/mongo/config/newrelic.yml +0 -1
- data/test/multiverse/suites/net_http/config/newrelic.yml +0 -1
- data/test/multiverse/suites/padrino/config/newrelic.yml +0 -1
- data/test/multiverse/suites/rack/config/newrelic.yml +0 -1
- data/test/multiverse/suites/rails/config/newrelic.yml +0 -1
- data/test/multiverse/suites/rake/config/newrelic.yml +0 -1
- data/test/multiverse/suites/redis/config/newrelic.yml +0 -1
- data/test/multiverse/suites/resque/config/newrelic.yml +0 -1
- data/test/multiverse/suites/sequel/config/newrelic.yml +0 -1
- data/test/multiverse/suites/sidekiq/config/newrelic.yml +0 -1
- data/test/multiverse/suites/sinatra/config/newrelic.yml +0 -1
- data/test/multiverse/suites/typhoeus/config/newrelic.yml +0 -1
- data/test/multiverse/suites/yajl/config/newrelic.yml +0 -1
- data/test/multiverse/test/suite_examples/one/a/config/newrelic.yml +0 -1
- data/test/multiverse/test/suite_examples/one/b/config/newrelic.yml +0 -1
- data/test/new_relic/agent/agent/connect_test.rb +3 -12
- data/test/new_relic/agent/agent/start_test.rb +4 -2
- data/test/new_relic/agent/busy_calculator_test.rb +13 -5
- data/test/new_relic/agent/pipe_channel_manager_test.rb +3 -4
- data/test/new_relic/agent/stats_engine_test.rb +313 -1
- data/test/new_relic/agent/stats_test.rb +0 -20
- data/test/new_relic/agent/traced_method_stack_test.rb +2 -5
- data/test/new_relic/agent/transaction/external_request_segment_test.rb +5 -0
- data/test/new_relic/agent/transaction/trace_node_test.rb +0 -19
- data/test/new_relic/agent/transaction_sampler_test.rb +3 -6
- data/test/new_relic/collection_helper_test.rb +0 -39
- data/test/new_relic/control_test.rb +2 -4
- data/test/new_relic/license_test.rb +4 -14
- data/test/performance/suites/external_segment.rb +0 -2
- data/test/performance/suites/rack_middleware.rb +1 -3
- data/test/performance/suites/transaction_tracing.rb +0 -1
- metadata +2 -94
- data/lib/conditional_vendored_metric_parser.rb +0 -9
- data/lib/new_relic/agent/instrumentation/rubyprof.rb +0 -26
- data/lib/new_relic/agent/stats_engine/metric_stats.rb +0 -188
- data/lib/new_relic/agent/transaction/developer_mode_sample_buffer.rb +0 -62
- data/lib/new_relic/merbtasks.rb +0 -10
- data/lib/new_relic/rack/developer_mode.rb +0 -321
- data/lib/new_relic/rack/developer_mode/segment_summary.rb +0 -56
- data/test/new_relic/agent/stats_engine/metric_stats_test.rb +0 -328
- data/test/new_relic/agent/transaction/developer_mode_sample_buffer_test.rb +0 -75
- data/test/new_relic/metric_parser/metric_parser_test.rb +0 -17
- data/test/new_relic/rack/developer_mode/segment_summary_test.rb +0 -96
- data/test/new_relic/rack/developer_mode_helper_test.rb +0 -136
- data/test/new_relic/rack/developer_mode_test.rb +0 -96
- data/ui/helpers/developer_mode_helper.rb +0 -325
- data/ui/helpers/google_pie_chart.rb +0 -54
- data/ui/views/layouts/newrelic_default.rhtml +0 -48
- data/ui/views/newrelic/_explain_plans.rhtml +0 -27
- data/ui/views/newrelic/_sample.rhtml +0 -20
- data/ui/views/newrelic/_segment.rhtml +0 -28
- data/ui/views/newrelic/_segment_limit_message.rhtml +0 -1
- data/ui/views/newrelic/_segment_row.rhtml +0 -12
- data/ui/views/newrelic/_show_sample_detail.rhtml +0 -24
- data/ui/views/newrelic/_show_sample_sql.rhtml +0 -24
- data/ui/views/newrelic/_show_sample_summary.rhtml +0 -3
- data/ui/views/newrelic/_sql_row.rhtml +0 -16
- data/ui/views/newrelic/_stack_trace.rhtml +0 -15
- data/ui/views/newrelic/_table.rhtml +0 -12
- data/ui/views/newrelic/explain_sql.rhtml +0 -43
- data/ui/views/newrelic/file/images/arrow-close.png +0 -0
- data/ui/views/newrelic/file/images/arrow-open.png +0 -0
- data/ui/views/newrelic/file/images/blue_bar.gif +0 -0
- data/ui/views/newrelic/file/images/file_icon.png +0 -0
- data/ui/views/newrelic/file/images/gray_bar.gif +0 -0
- data/ui/views/newrelic/file/images/new-relic-rpm-desktop.gif +0 -0
- data/ui/views/newrelic/file/images/new_relic_rpm_desktop.gif +0 -0
- data/ui/views/newrelic/file/images/textmate.png +0 -0
- data/ui/views/newrelic/file/javascript/jquery-1.4.2.js +0 -6243
- data/ui/views/newrelic/file/javascript/transaction_sample.js +0 -123
- data/ui/views/newrelic/file/stylesheets/style.css +0 -490
- data/ui/views/newrelic/index.rhtml +0 -70
- data/ui/views/newrelic/sample_not_found.rhtml +0 -2
- data/ui/views/newrelic/show_sample.rhtml +0 -81
- data/ui/views/newrelic/threads.rhtml +0 -45
- data/vendor/gems/metric_parser-0.1.0.pre1/.specification +0 -116
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/metric_parser.rb +0 -5
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb +0 -70
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb +0 -18
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb +0 -35
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb +0 -37
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb +0 -93
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb +0 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb +0 -50
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb +0 -71
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb +0 -47
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_ext.rb +0 -21
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb +0 -52
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database_pool.rb +0 -28
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net.rb +0 -32
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net_parser.rb +0 -21
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb +0 -15
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb +0 -59
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/frontend.rb +0 -44
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/gc.rb +0 -24
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/hibernate_session.rb +0 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb +0 -35
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java_parser.rb +0 -21
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp.rb +0 -38
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb +0 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb +0 -56
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb +0 -138
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb +0 -33
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/nested.rb +0 -23
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb +0 -31
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb +0 -44
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb +0 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_context_listener.rb +0 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_filter.rb +0 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb +0 -11
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb +0 -31
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb +0 -19
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring.rb +0 -58
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_controller.rb +0 -10
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_view.rb +0 -10
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_action.rb +0 -24
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_result.rb +0 -24
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/version.rb +0 -9
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +0 -74
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb +0 -22
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb +0 -18
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb +0 -137
@@ -1,37 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
module NewRelic
|
6
|
-
autoload :MetricParser, 'new_relic/metric_parser'
|
7
|
-
module MetricParser
|
8
|
-
class ActiveRecord < NewRelic::MetricParser::MetricParser
|
9
|
-
def is_active_record? ; true; end
|
10
|
-
|
11
|
-
def model_class
|
12
|
-
return segments[1]
|
13
|
-
end
|
14
|
-
|
15
|
-
def is_database?
|
16
|
-
true
|
17
|
-
end
|
18
|
-
def legend_name
|
19
|
-
if name == 'ActiveRecord/all'
|
20
|
-
'Database'
|
21
|
-
else
|
22
|
-
super
|
23
|
-
end
|
24
|
-
end
|
25
|
-
def tooltip_name
|
26
|
-
if name == 'ActiveRecord/all'
|
27
|
-
'all SQL execution'
|
28
|
-
else
|
29
|
-
super
|
30
|
-
end
|
31
|
-
end
|
32
|
-
def developer_name
|
33
|
-
"#{model_class}##{segments.last}"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
module NewRelic
|
6
|
-
autoload :MetricParser, 'new_relic/metric_parser'
|
7
|
-
module MetricParser
|
8
|
-
class Apdex < NewRelic::MetricParser::MetricParser
|
9
|
-
|
10
|
-
CLIENT = 'Client'
|
11
|
-
|
12
|
-
# Convenience method for creating the appropriate client
|
13
|
-
# metric name.
|
14
|
-
def self.client_metric(apdex_t)
|
15
|
-
"Apdex/#{CLIENT}/#{apdex_t}"
|
16
|
-
end
|
17
|
-
def self.browser_client_metric(os, browser, version, apdex_t)
|
18
|
-
"#{self.client_metric(apdex_t)}/#{os}/#{browser}/#{version}"
|
19
|
-
end
|
20
|
-
|
21
|
-
def is_apdex?; true; end
|
22
|
-
def is_client?
|
23
|
-
segments[1] == CLIENT
|
24
|
-
end
|
25
|
-
def is_client_summary?
|
26
|
-
is_client? && segments.size == 3
|
27
|
-
end
|
28
|
-
def is_browser_summary?
|
29
|
-
is_client? && segments.size == 6
|
30
|
-
end
|
31
|
-
def is_summary?
|
32
|
-
segments.size == 1
|
33
|
-
end
|
34
|
-
|
35
|
-
# Apdex/Client/N
|
36
|
-
def apdex_t
|
37
|
-
is_client? && segments[2].to_f
|
38
|
-
end
|
39
|
-
|
40
|
-
def platform
|
41
|
-
is_browser_summary? && segments[3]
|
42
|
-
end
|
43
|
-
|
44
|
-
def browser
|
45
|
-
is_browser_summary? && segments[4]
|
46
|
-
end
|
47
|
-
|
48
|
-
def browser_version
|
49
|
-
is_browser_summary? && segments[5]
|
50
|
-
end
|
51
|
-
|
52
|
-
def user_agent
|
53
|
-
is_browser_summary? && segments[4..-1].join(" ")
|
54
|
-
end
|
55
|
-
|
56
|
-
def platform_and_user_agent
|
57
|
-
is_browser_summary? && segments[3..-1].join(" ")
|
58
|
-
end
|
59
|
-
|
60
|
-
def developer_name
|
61
|
-
case
|
62
|
-
when is_client? then "Apdex Client (#{apdex_t})"
|
63
|
-
when is_browser_summary? then "Apdex Client for #{os_and_browser} (#{apdex_t})"
|
64
|
-
when is_summary? then "Apdex"
|
65
|
-
else "Apdex #{segments[1..-1].join("/")}"
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
def short_name
|
70
|
-
# standard controller actions
|
71
|
-
if segments.length > 1
|
72
|
-
url
|
73
|
-
else
|
74
|
-
'All Frontend Urls'
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def url
|
79
|
-
'/' + segments[1..-1].join('/')
|
80
|
-
end
|
81
|
-
|
82
|
-
# this is used to match transaction traces to controller actions.
|
83
|
-
# TT's don't have a preceding slash :P
|
84
|
-
def tt_path
|
85
|
-
segments[1..-1].join('/')
|
86
|
-
end
|
87
|
-
|
88
|
-
def call_rate_suffix
|
89
|
-
'rpm'
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
require 'new_relic/metric_parser/java'
|
6
|
-
class NewRelic::MetricParser::BackgroundTransaction < NewRelic::MetricParser::Java
|
7
|
-
|
8
|
-
def call_rate_suffix
|
9
|
-
'cpm'
|
10
|
-
end
|
11
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
class NewRelic::MetricParser::Client < NewRelic::MetricParser::MetricParser
|
6
|
-
|
7
|
-
def measure
|
8
|
-
segments[1]
|
9
|
-
end
|
10
|
-
|
11
|
-
def frontend?; measure == 'frontend'; end
|
12
|
-
def backend?; measure == 'backend'; end
|
13
|
-
def totaltime?; measure == 'totaltime'; end
|
14
|
-
|
15
|
-
def all?
|
16
|
-
segments[1].index('all') == 0
|
17
|
-
end
|
18
|
-
|
19
|
-
def operation
|
20
|
-
all? ? 'All Operations' : segments[1].titleize.gsub(/(load|ready|time|end)$/,' \1')
|
21
|
-
end
|
22
|
-
|
23
|
-
def legend_name
|
24
|
-
if frontend?
|
25
|
-
"Browser Rendering and Asset Download"
|
26
|
-
elsif backend?
|
27
|
-
"Backend and Network"
|
28
|
-
else
|
29
|
-
segments[1..-1].join(" ")
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def platform
|
34
|
-
segments[2]
|
35
|
-
end
|
36
|
-
|
37
|
-
def user_agent
|
38
|
-
segments[3..-1].join(" ")
|
39
|
-
end
|
40
|
-
|
41
|
-
def platform_and_user_agent
|
42
|
-
segments[2..-1].join(" ")
|
43
|
-
end
|
44
|
-
|
45
|
-
def developer_name
|
46
|
-
name = segments[1].capitalize
|
47
|
-
name << " (#{segments[2..-1].join(" ")})" if segments.length > 2
|
48
|
-
name
|
49
|
-
end
|
50
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
module NewRelic
|
6
|
-
autoload :MetricParser, 'new_relic/metric_parser'
|
7
|
-
module MetricParser
|
8
|
-
class Controller < NewRelic::MetricParser::MetricParser
|
9
|
-
|
10
|
-
def is_controller?; true; end
|
11
|
-
def is_transaction?; true; end
|
12
|
-
|
13
|
-
# If the controller name segments look like a file path, convert it to the controller
|
14
|
-
# class name. If it begins with a capital letter, assume it's already a class name.
|
15
|
-
# We only expect a lower case letter with Rails, so we'll be able to use camelize for
|
16
|
-
# that.
|
17
|
-
def controller_name
|
18
|
-
path = segments[1..-2].join('/')
|
19
|
-
path < 'a' ? path : path.camelize+"Controller"
|
20
|
-
end
|
21
|
-
|
22
|
-
def action_name
|
23
|
-
if segments[-1] =~ /^\(other\)$/
|
24
|
-
'(template only)'
|
25
|
-
else
|
26
|
-
segments[-1]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def developer_name
|
31
|
-
"#{controller_name}##{action_name}"
|
32
|
-
end
|
33
|
-
|
34
|
-
def is_web_transaction?
|
35
|
-
true
|
36
|
-
end
|
37
|
-
# return the cpu measuring equivalent. It may be nil since this metric was not
|
38
|
-
# present in earlier versions of the agent.
|
39
|
-
def cpu_metric
|
40
|
-
Metric.lookup((["ControllerCPU"] + segments[1..-1]).join('/'), :create => false)
|
41
|
-
end
|
42
|
-
|
43
|
-
def short_name
|
44
|
-
# standard controller actions
|
45
|
-
if segments.length > 1
|
46
|
-
url
|
47
|
-
else
|
48
|
-
'All Controller Actions'
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def url
|
53
|
-
'/' + segments[1..-1].join('/')
|
54
|
-
end
|
55
|
-
|
56
|
-
# this is used to match transaction traces to controller actions.
|
57
|
-
# TT's don't have a preceding slash :P
|
58
|
-
def tt_path
|
59
|
-
segments[1..-1].join('/')
|
60
|
-
end
|
61
|
-
|
62
|
-
def call_rate_suffix
|
63
|
-
'rpm'
|
64
|
-
end
|
65
|
-
|
66
|
-
def summary_metrics
|
67
|
-
%w[HttpDispatcher]
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
module NewRelic
|
6
|
-
autoload :MetricParser, 'new_relic/metric_parser'
|
7
|
-
module MetricParser
|
8
|
-
class ControllerCPU < NewRelic::MetricParser::MetricParser
|
9
|
-
|
10
|
-
def is_controller_cpu?; true; end
|
11
|
-
|
12
|
-
def controller_name
|
13
|
-
segments[1..-2].join('/').camelize+"Controller"
|
14
|
-
end
|
15
|
-
|
16
|
-
def action_name
|
17
|
-
segments[-1]
|
18
|
-
end
|
19
|
-
|
20
|
-
def developer_name
|
21
|
-
"#{controller_name}##{action_name}"
|
22
|
-
end
|
23
|
-
|
24
|
-
def base_metric_name
|
25
|
-
"Controller/" + segments[1..-1].join('/')
|
26
|
-
end
|
27
|
-
|
28
|
-
def short_name
|
29
|
-
# standard controller actions
|
30
|
-
if segments.length > 1
|
31
|
-
url
|
32
|
-
else
|
33
|
-
'All Controller Actions'
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def url
|
38
|
-
'/' + segments[1..-1].join('/')
|
39
|
-
end
|
40
|
-
|
41
|
-
def call_rate_suffix
|
42
|
-
'rpm'
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
# Extend the controller with extra behavior from web transactions
|
6
|
-
# This is just temporary until we switchover to WebTransaction from Controller.
|
7
|
-
|
8
|
-
NewRelic::MetricParser::Controller.class_eval do
|
9
|
-
|
10
|
-
def initialize(name)
|
11
|
-
super
|
12
|
-
if %w[Sinatra Rack Task].include?(segment_1)
|
13
|
-
self.extend NewRelic::MetricParser::WebTransaction.const_get(segment_1)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# default to v2 Web Transactions tab
|
18
|
-
def drilldown_url(metric_id)
|
19
|
-
{:controller => '/v2/transactions', :action => 'index', :anchor => "id=#{metric_id}"}
|
20
|
-
end
|
21
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
class NewRelic::MetricParser::Database < NewRelic::MetricParser::MetricParser
|
6
|
-
def is_database?; true; end
|
7
|
-
|
8
|
-
def database
|
9
|
-
segments[1]
|
10
|
-
end
|
11
|
-
|
12
|
-
def operation
|
13
|
-
op = segments.last
|
14
|
-
case
|
15
|
-
when op == 'Join Table Columns'
|
16
|
-
op.upcase
|
17
|
-
when op == 'all'
|
18
|
-
op
|
19
|
-
else
|
20
|
-
op.split(' ').last.upcase
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def developer_name
|
25
|
-
if segments.size == 3
|
26
|
-
"#{database} - #{operation}"
|
27
|
-
else
|
28
|
-
operation
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def legend_name
|
33
|
-
if all?
|
34
|
-
'Database'
|
35
|
-
else
|
36
|
-
super
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def tooltip_name
|
41
|
-
if all?
|
42
|
-
'all SQL execution'
|
43
|
-
else
|
44
|
-
super
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
private
|
49
|
-
def all?
|
50
|
-
name == 'Database/all' || name == 'Database/allWeb' || name == 'Database/allOther'
|
51
|
-
end
|
52
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
class NewRelic::MetricParser::DatabasePool < NewRelic::MetricParser::MetricParser
|
6
|
-
|
7
|
-
def developer_name
|
8
|
-
segs = segments
|
9
|
-
if segs.length > 3
|
10
|
-
segs[2,segs.length - 3].join("/")
|
11
|
-
else
|
12
|
-
name
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def pie_chart_label
|
17
|
-
short_name
|
18
|
-
end
|
19
|
-
|
20
|
-
def tooltip_name
|
21
|
-
developer_name + " " + last_segment
|
22
|
-
end
|
23
|
-
|
24
|
-
# class name with/out package name and method name
|
25
|
-
def short_name
|
26
|
-
developer_name
|
27
|
-
end
|
28
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# This file is distributed under New Relic's license terms.
|
3
|
-
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
-
|
5
|
-
require 'new_relic/metric_parser/dot_net_parser'
|
6
|
-
|
7
|
-
class NewRelic::MetricParser::DotNet < NewRelic::MetricParser::MetricParser
|
8
|
-
|
9
|
-
def initialize(name)
|
10
|
-
super
|
11
|
-
if segments.length > 2
|
12
|
-
self.extend DotNetParser
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def pie_chart_label
|
17
|
-
short_name
|
18
|
-
end
|
19
|
-
|
20
|
-
def tooltip_name
|
21
|
-
developer_name
|
22
|
-
end
|
23
|
-
|
24
|
-
def full_class_name
|
25
|
-
segment_1
|
26
|
-
end
|
27
|
-
|
28
|
-
def method_name
|
29
|
-
segment_2
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|