wd_newrelic_rpm 3.5.5 → 3.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/CHANGELOG +60 -0
- data/Rakefile +14 -18
- data/gem-public_cert.pem +20 -0
- data/lib/new_relic/agent.rb +3 -0
- data/lib/new_relic/agent/agent.rb +86 -97
- data/lib/new_relic/agent/agent_logger.rb +9 -1
- data/lib/new_relic/agent/busy_calculator.rb +5 -0
- data/lib/new_relic/agent/configuration/defaults.rb +3 -3
- data/lib/new_relic/agent/configuration/manager.rb +12 -0
- data/lib/new_relic/agent/configuration/mask_defaults.rb +1 -0
- data/lib/new_relic/agent/configuration/yaml_source.rb +5 -1
- data/lib/new_relic/agent/cross_process_monitoring.rb +164 -20
- data/lib/new_relic/agent/error_collector.rb +13 -2
- data/lib/new_relic/agent/event_listener.rb +39 -0
- data/lib/new_relic/agent/instrumentation/browser_monitoring_timings.rb +18 -8
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sinatra.rb +8 -1
- data/lib/new_relic/agent/new_relic_service.rb +90 -10
- data/lib/new_relic/agent/pipe_service.rb +9 -0
- data/lib/new_relic/agent/sql_sampler.rb +10 -3
- data/lib/new_relic/agent/stats_engine/transactions.rb +1 -0
- data/lib/new_relic/agent/thread_profiler.rb +20 -7
- data/lib/new_relic/agent/worker_loop.rb +2 -1
- data/lib/new_relic/coerce.rb +37 -0
- data/lib/new_relic/commands/deployments.rb +1 -1
- data/lib/new_relic/control/frameworks/rails.rb +29 -5
- data/lib/new_relic/control/frameworks/rails3.rb +2 -11
- data/lib/new_relic/control/instance_methods.rb +11 -7
- data/lib/new_relic/control/server_methods.rb +5 -37
- data/lib/new_relic/latest_changes.rb +31 -0
- data/lib/new_relic/local_environment.rb +1 -1
- data/lib/new_relic/metric_data.rb +13 -2
- data/lib/new_relic/noticed_error.rb +8 -1
- data/lib/new_relic/rack/agent_hooks.rb +20 -0
- data/lib/new_relic/rack/error_collector.rb +11 -1
- data/lib/new_relic/recipes.rb +32 -10
- data/lib/new_relic/transaction_sample.rb +12 -3
- data/lib/new_relic/transaction_sample/segment.rb +6 -3
- data/lib/new_relic/version.rb +10 -15
- data/newrelic.yml +12 -19
- data/newrelic_rpm.gemspec +22 -464
- data/test/multiverse/.gitignore +1 -0
- data/test/multiverse/lib/multiverse/environment.rb +1 -1
- data/test/multiverse/lib/multiverse/suite.rb +2 -0
- data/test/multiverse/suites/active_record/Envfile +3 -3
- data/test/multiverse/suites/active_record/ar_method_aliasing.rb +1 -1
- data/test/multiverse/suites/active_record/config/newrelic.yml +2 -2
- data/test/multiverse/suites/agent_only/Envfile +2 -1
- data/test/multiverse/suites/agent_only/config/newrelic.yml +3 -1
- data/test/multiverse/suites/agent_only/cross_process_test.rb +56 -0
- data/test/multiverse/suites/{logging → agent_only}/logging_test.rb +42 -22
- data/test/multiverse/suites/agent_only/no_dns_resolv.rb +17 -0
- data/test/multiverse/suites/{rum_auto_instrumentation/sanity_test.rb → agent_only/rum_instrumentation_test.rb} +25 -46
- data/test/multiverse/suites/agent_only/service_timeout_test.rb +6 -3
- data/test/multiverse/suites/agent_only/ssl_test.rb +22 -0
- data/test/multiverse/suites/{no_load → agent_only}/start_up_test.rb +9 -2
- data/test/multiverse/suites/agent_only/testing_app.rb +17 -0
- data/test/multiverse/suites/agent_only/thread_profiling_test.rb +6 -5
- data/test/multiverse/suites/datamapper/config/newrelic.yml +1 -1
- data/test/multiverse/suites/{rails_3_queue_time → rails}/Envfile +3 -0
- data/test/multiverse/suites/rails/app.rb +49 -0
- data/test/multiverse/suites/{rails_3_views → rails}/app/views/foos/_foo.html.haml +0 -0
- data/test/multiverse/suites/{rails_3_views/app/views/test → rails/app/views/views}/_a_partial.html.erb +0 -0
- data/test/multiverse/suites/{rails_3_views/app/views/test → rails/app/views/views}/_mid_partial.html.erb +0 -0
- data/test/multiverse/suites/{rails_3_views/app/views/test → rails/app/views/views}/_top_partial.html.erb +0 -0
- data/test/multiverse/suites/{rails_3_views/app/views/test → rails/app/views/views}/deep_partial.html.erb +0 -0
- data/test/multiverse/suites/{rails_3_views/app/views/test → rails/app/views/views}/haml_view.html.haml +0 -0
- data/test/multiverse/suites/{rails_3_views/app/views/test → rails/app/views/views}/index.html.erb +0 -0
- data/test/multiverse/suites/rails/config/newrelic.yml +32 -0
- data/test/multiverse/suites/{rails_3_error_tracing → rails}/error_tracing_test.rb +51 -88
- data/test/multiverse/suites/rails/gc_instrumentation_test.rb +79 -0
- data/test/multiverse/suites/{rails_3_queue_time → rails}/queue_time_test.rb +3 -23
- data/test/multiverse/suites/{rails_3_views → rails}/view_instrumentation_test.rb +21 -61
- data/test/multiverse/suites/resque/Envfile +7 -4
- data/test/multiverse/suites/resque/Rakefile +8 -0
- data/test/multiverse/suites/resque/config/newrelic.yml +1 -1
- data/test/multiverse/suites/resque/instrumentation_test.rb +118 -41
- data/test/multiverse/suites/resque/resque_setup.rb +15 -0
- data/test/multiverse/suites/sinatra/config/newrelic.yml +1 -2
- data/test/multiverse/suites/sinatra/sinatra_error_tracing_test.rb +38 -0
- data/test/multiverse/suites/sinatra/sinatra_test.rb +17 -0
- data/test/multiverse/test/suite_examples/one/a/config/newrelic.yml +1 -1
- data/test/multiverse/test/suite_examples/one/b/config/newrelic.yml +1 -1
- data/test/new_relic/agent/agent/connect_test.rb +24 -100
- data/test/new_relic/agent/agent/start_worker_thread_test.rb +3 -3
- data/test/new_relic/agent/agent_test.rb +126 -31
- data/test/new_relic/agent/browser_monitoring_test.rb +1 -1
- data/test/new_relic/agent/busy_calculator_test.rb +8 -0
- data/test/new_relic/agent/configuration/manager_test.rb +28 -0
- data/test/new_relic/agent/configuration/yaml_source_test.rb +12 -2
- data/test/new_relic/agent/cross_process_monitoring_test.rb +144 -31
- data/test/new_relic/agent/error_collector_test.rb +16 -0
- data/test/new_relic/agent/event_listener_test.rb +46 -0
- data/test/new_relic/agent/instrumentation/browser_monitoring_timings_test.rb +57 -30
- data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +1 -0
- data/test/new_relic/agent/new_relic_service_test.rb +95 -2
- data/test/new_relic/agent/pipe_channel_manager_test.rb +3 -3
- data/test/new_relic/agent/pipe_service_test.rb +21 -1
- data/test/new_relic/agent/rpm_agent_test.rb +1 -1
- data/test/new_relic/agent/sql_sampler_test.rb +20 -0
- data/test/new_relic/agent/thread_profiler_test.rb +53 -8
- data/test/new_relic/agent/worker_loop_test.rb +19 -16
- data/test/new_relic/agent_test.rb +1 -2
- data/test/new_relic/coerce_test.rb +65 -0
- data/test/new_relic/command/deployments_test.rb +1 -1
- data/test/new_relic/control_test.rb +23 -44
- data/test/new_relic/fake_collector.rb +34 -6
- data/test/new_relic/local_environment_test.rb +1 -1
- data/test/new_relic/metric_data_test.rb +29 -0
- data/test/new_relic/noticed_error_test.rb +8 -0
- data/test/new_relic/rack/agent_hooks_test.rb +30 -0
- data/test/new_relic/rack/error_collector_test.rb +16 -0
- data/test/new_relic/transaction_sample/segment_test.rb +7 -0
- data/test/new_relic/transaction_sample_test.rb +36 -8
- data/test/new_relic/version_number_test.rb +6 -30
- data/test/script/ci.sh +6 -5
- data/test/test_contexts.rb +2 -1
- data/test/test_helper.rb +23 -6
- data/ui/helpers/google_pie_chart.rb +1 -0
- metadata +68 -67
- data/newrelic_rpm.gemspec.erb +0 -54
- data/test/fixtures/gemspec_no_build.rb +0 -442
- data/test/fixtures/gemspec_with_build.rb +0 -442
- data/test/fixtures/gemspec_with_build_and_stage.rb +0 -442
- data/test/multiverse/suites/logging/Envfile +0 -4
- data/test/multiverse/suites/logging/config/newrelic.yml +0 -22
- data/test/multiverse/suites/monitor_mode_false/Envfile +0 -2
- data/test/multiverse/suites/monitor_mode_false/config/newrelic.yml +0 -25
- data/test/multiverse/suites/monitor_mode_false/no_dns_resolv.rb +0 -29
- data/test/multiverse/suites/no_load/Envfile +0 -2
- data/test/multiverse/suites/no_load/config/newrelic.yml +0 -22
- data/test/multiverse/suites/rails_3_error_tracing/Envfile +0 -15
- data/test/multiverse/suites/rails_3_error_tracing/config/newrelic.yml +0 -165
- data/test/multiverse/suites/rails_3_gc/Envfile +0 -8
- data/test/multiverse/suites/rails_3_gc/config/newrelic.yml +0 -167
- data/test/multiverse/suites/rails_3_gc/instrumentation_test.rb +0 -92
- data/test/multiverse/suites/rails_3_queue_time/config/newrelic.yml +0 -165
- data/test/multiverse/suites/rails_3_views/.gitignore +0 -3
- data/test/multiverse/suites/rails_3_views/Envfile +0 -16
- data/test/multiverse/suites/rails_3_views/config/newrelic.yml +0 -164
- data/test/multiverse/suites/resque/dump.rdb +0 -0
- data/test/multiverse/suites/rum_auto_instrumentation/Envfile +0 -4
- data/test/multiverse/suites/rum_auto_instrumentation/config/newrelic.yml +0 -24
- data/test/multiverse/suites/rum_auto_instrumentation/responses/worst_case_small.html +0 -5000
- data/test/new_relic/fake_service.rb +0 -53
@@ -7,20 +7,20 @@ module NewRelic
|
|
7
7
|
end
|
8
8
|
|
9
9
|
ProxyServer = Struct.new :name, :port, :user, :password #:nodoc:
|
10
|
-
|
10
|
+
|
11
11
|
# Contains methods that deal with connecting to the server
|
12
12
|
module ServerMethods
|
13
|
-
|
13
|
+
|
14
14
|
def server
|
15
15
|
@remote_server ||= server_from_host(nil)
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
# the server we should contact for api requests, like uploading
|
19
19
|
# deployments and the like
|
20
20
|
def api_server
|
21
21
|
@api_server ||= NewRelic::Control::Server.new(Agent.config[:api_host], Agent.config[:api_port], nil)
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
# a new instances of the proxy server - this passes through if
|
25
25
|
# there is no proxy, otherwise it has proxy configuration
|
26
26
|
# information pulled from the config file
|
@@ -30,7 +30,7 @@ module NewRelic
|
|
30
30
|
Agent.config[:proxy_user],
|
31
31
|
Agent.config[:proxy_pass])
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
# turns a hostname into an ip address and returns a
|
35
35
|
# NewRelic::Control::Server that contains the configuration info
|
36
36
|
def server_from_host(hostname=nil)
|
@@ -72,38 +72,6 @@ module NewRelic
|
|
72
72
|
nil
|
73
73
|
end
|
74
74
|
end
|
75
|
-
|
76
|
-
# The path to the certificate file used to verify the SSL
|
77
|
-
# connection if verify_peer is enabled
|
78
|
-
def cert_file_path
|
79
|
-
File.expand_path(File.join(newrelic_root, 'cert', 'cacert.pem'))
|
80
|
-
end
|
81
|
-
|
82
|
-
# Return the Net::HTTP with proxy configuration given the NewRelic::Control::Server object.
|
83
|
-
# Default is the collector but for api calls you need to pass api_server
|
84
|
-
#
|
85
|
-
# Experimental support for SSL verification:
|
86
|
-
# swap 'VERIFY_NONE' for 'VERIFY_PEER' line to try it out
|
87
|
-
# If verification fails, uncomment the 'http.ca_file' line
|
88
|
-
# and it will use the included certificate.
|
89
|
-
def http_connection(host = nil)
|
90
|
-
host ||= server
|
91
|
-
# Proxy returns regular HTTP if @proxy_host is nil (the default)
|
92
|
-
http_class = Net::HTTP::Proxy(proxy_server.name, proxy_server.port,
|
93
|
-
proxy_server.user, proxy_server.password)
|
94
|
-
http = http_class.new(host.ip || host.name, host.port)
|
95
|
-
::NewRelic::Agent.logger.debug("Http Connection opened to #{host.ip||host.name}:#{host.port}")
|
96
|
-
if Agent.config[:ssl]
|
97
|
-
http.use_ssl = true
|
98
|
-
if Agent.config[:verify_certificate]
|
99
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
100
|
-
http.ca_file = cert_file_path
|
101
|
-
else
|
102
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
103
|
-
end
|
104
|
-
end
|
105
|
-
http
|
106
|
-
end
|
107
75
|
end
|
108
76
|
|
109
77
|
include ServerMethods
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
module NewRelic
|
4
|
+
module LatestChanges
|
5
|
+
def self.default_changelog
|
6
|
+
File.join(File.dirname(__FILE__), '..', '..', 'CHANGELOG')
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.read(changelog=default_changelog)
|
10
|
+
footer = <<'EOS'
|
11
|
+
See https://github.com/newrelic/rpm/blob/master/CHANGELOG for a full list of
|
12
|
+
changes.
|
13
|
+
EOS
|
14
|
+
|
15
|
+
return footer unless File.exists?(changelog)
|
16
|
+
|
17
|
+
version_count = 0
|
18
|
+
changes = []
|
19
|
+
File.read(changelog).each_line do |line|
|
20
|
+
if line.match(/##\s+v[\d.]+\s+##/)
|
21
|
+
version_count += 1
|
22
|
+
end
|
23
|
+
break if version_count >= 2
|
24
|
+
changes << line.chomp
|
25
|
+
end
|
26
|
+
|
27
|
+
changes << footer
|
28
|
+
change_message = changes.join("\n")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -242,7 +242,7 @@ module NewRelic
|
|
242
242
|
# Although you can override the dispatcher with NEWRELIC_DISPATCHER this
|
243
243
|
# is not advisable since it implies certain api's being available.
|
244
244
|
def discover_dispatcher
|
245
|
-
dispatchers = %w[passenger torquebox glassfish thin mongrel litespeed webrick fastcgi unicorn sinatra]
|
245
|
+
dispatchers = %w[passenger torquebox trinidad glassfish thin mongrel litespeed webrick fastcgi unicorn sinatra]
|
246
246
|
while dispatchers.any? && @discovered_dispatcher.nil?
|
247
247
|
send 'check_for_'+(dispatchers.shift)
|
248
248
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'new_relic/coerce'
|
2
|
+
|
1
3
|
module NewRelic
|
2
4
|
class MetricData
|
3
5
|
# nil, or a NewRelic::MetricSpec object if we have no cached ID
|
@@ -49,11 +51,20 @@ module NewRelic
|
|
49
51
|
"#<MetricData metric_spec:#{metric_spec.inspect}, stats:#{stats.inspect}, metric_id:#{metric_id.inspect}>"
|
50
52
|
end
|
51
53
|
|
54
|
+
include NewRelic::Coerce
|
55
|
+
|
52
56
|
def to_collector_array(encoder=nil)
|
53
57
|
stat_key = metric_id || { 'name' => metric_spec.name, 'scope' => metric_spec.scope }
|
54
58
|
[ stat_key,
|
55
|
-
[
|
56
|
-
stats.
|
59
|
+
[
|
60
|
+
int(stats.call_count, stat_key),
|
61
|
+
float(stats.total_call_time, stat_key),
|
62
|
+
float(stats.total_exclusive_time, stat_key),
|
63
|
+
float(stats.min_call_time, stat_key),
|
64
|
+
float(stats.max_call_time, stat_key),
|
65
|
+
float(stats.sum_of_squares, stat_key)
|
66
|
+
]
|
67
|
+
]
|
57
68
|
end
|
58
69
|
end
|
59
70
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'new_relic/helper'
|
2
|
+
|
1
3
|
# This class encapsulates an error that was noticed by New Relic in a managed app.
|
2
4
|
class NewRelic::NoticedError
|
3
5
|
extend NewRelic::CollectionHelper
|
@@ -45,8 +47,13 @@ class NewRelic::NoticedError
|
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
50
|
+
include NewRelic::Coerce
|
51
|
+
|
48
52
|
def to_collector_array(encoder=nil)
|
49
|
-
[ (@timestamp
|
53
|
+
[ NewRelic::Helper.time_to_millis(@timestamp),
|
54
|
+
string(@path),
|
55
|
+
string(@message),
|
56
|
+
string(@exception_class),
|
50
57
|
@params ]
|
51
58
|
end
|
52
59
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'new_relic/agent/event_listener'
|
2
|
+
|
3
|
+
module NewRelic::Rack
|
4
|
+
class AgentHooks
|
5
|
+
def initialize(app, options = {})
|
6
|
+
@app = app
|
7
|
+
end
|
8
|
+
|
9
|
+
# method required by Rack interface
|
10
|
+
# [status, headers, response]
|
11
|
+
def call(env)
|
12
|
+
events = NewRelic::Agent.instance.events
|
13
|
+
events.notify(:before_call, env)
|
14
|
+
result = @app.call(env)
|
15
|
+
events.notify(:after_call, env, result)
|
16
|
+
result
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -7,12 +7,22 @@ module NewRelic::Rack
|
|
7
7
|
def call(env)
|
8
8
|
@app.call(env)
|
9
9
|
rescue Exception => exception
|
10
|
+
NewRelic::Agent.logger.debug "collecting %p: %s" % [ exception.class, exception.message ]
|
10
11
|
request = Rack::Request.new(env)
|
12
|
+
|
11
13
|
if !should_ignore_error?(exception, request)
|
14
|
+
params = begin
|
15
|
+
request.params
|
16
|
+
rescue => err
|
17
|
+
warning = "failed to capture request parameters: %p: %s" % [ err.class, err.message ]
|
18
|
+
NewRelic::Agent.logger.warn(warning)
|
19
|
+
{'error' => warning}
|
20
|
+
end
|
21
|
+
|
12
22
|
NewRelic::Agent.instance.error_collector.notice_error(exception,
|
13
23
|
:uri => request.path,
|
14
24
|
:referer => request.referer,
|
15
|
-
:request_params =>
|
25
|
+
:request_params => params)
|
16
26
|
end
|
17
27
|
raise exception
|
18
28
|
end
|
data/lib/new_relic/recipes.rb
CHANGED
@@ -16,47 +16,65 @@ make_notify_task = Proc.new do
|
|
16
16
|
desc "Record a deployment in New Relic (newrelic.com)"
|
17
17
|
task :notice_deployment, :roles => :app, :except => {:no_release => true } do
|
18
18
|
rails_env = fetch(:newrelic_rails_env, fetch(:rails_env, "production"))
|
19
|
+
|
19
20
|
require File.join(File.dirname(__FILE__), 'command.rb')
|
21
|
+
|
20
22
|
begin
|
21
|
-
# allow overrides to be defined for revision, description, changelog and
|
22
|
-
rev
|
23
|
-
description = fetch(:newrelic_desc)
|
24
|
-
changelog
|
25
|
-
appname
|
23
|
+
# allow overrides to be defined for revision, description, changelog, appname, and user
|
24
|
+
rev = fetch(:newrelic_revision) if exists?(:newrelic_revision)
|
25
|
+
description = fetch(:newrelic_desc) if exists?(:newrelic_desc)
|
26
|
+
changelog = fetch(:newrelic_changelog) if exists?(:newrelic_changelog)
|
27
|
+
appname = fetch(:newrelic_appname) if exists?(:newrelic_appname)
|
28
|
+
user = fetch(:newrelic_user) if exists?(:newrelic_user)
|
29
|
+
|
26
30
|
if !changelog
|
27
31
|
logger.debug "Getting log of changes for New Relic Deployment details"
|
28
32
|
from_revision = source.next_revision(current_revision)
|
33
|
+
|
29
34
|
if scm == :git
|
30
|
-
log_command = "git log --no-color --pretty=format:' * %an: %s'
|
35
|
+
log_command = "git log --no-color --pretty=format:' * %an: %s' " +
|
36
|
+
"--abbrev-commit --no-merges #{previous_revision}..#{real_revision}"
|
31
37
|
else
|
32
38
|
log_command = "#{source.log(from_revision)}"
|
33
39
|
end
|
40
|
+
|
34
41
|
changelog = `#{log_command}`
|
35
42
|
end
|
43
|
+
|
36
44
|
if rev.nil?
|
37
45
|
rev = source.query_revision(source.head()) do |cmd|
|
38
46
|
logger.debug "executing locally: '#{cmd}'"
|
39
47
|
`#{cmd}`
|
40
48
|
end
|
49
|
+
|
41
50
|
rev = rev[0..6] if scm == :git
|
42
51
|
end
|
52
|
+
|
43
53
|
new_revision = rev
|
44
|
-
deploy_options = {
|
45
|
-
:
|
46
|
-
:
|
54
|
+
deploy_options = {
|
55
|
+
:environment => rails_env,
|
56
|
+
:revision => new_revision,
|
57
|
+
:changelog => changelog,
|
47
58
|
:description => description,
|
48
|
-
:appname
|
59
|
+
:appname => appname,
|
60
|
+
:user => user
|
61
|
+
}
|
62
|
+
|
49
63
|
logger.debug "Uploading deployment to New Relic"
|
50
64
|
deployment = NewRelic::Command::Deployments.new deploy_options
|
51
65
|
deployment.run
|
52
66
|
logger.info "Uploaded deployment information to New Relic"
|
67
|
+
|
53
68
|
rescue NewRelic::Command::CommandFailure => e
|
54
69
|
logger.info e.message
|
70
|
+
|
55
71
|
rescue Capistrano::CommandError
|
56
72
|
logger.info "Unable to notify New Relic of the deployment... skipping"
|
73
|
+
|
57
74
|
rescue => e
|
58
75
|
logger.info "Error creating New Relic deployment (#{e})\n#{e.backtrace.join("\n")}"
|
59
76
|
end
|
77
|
+
|
60
78
|
# WIP: For rollbacks, let's update the deployment we created with an indication of the failure:
|
61
79
|
# on_rollback do
|
62
80
|
# run(...)
|
@@ -64,14 +82,18 @@ make_notify_task = Proc.new do
|
|
64
82
|
end
|
65
83
|
end
|
66
84
|
end
|
85
|
+
|
67
86
|
require 'capistrano/version'
|
87
|
+
|
68
88
|
if defined?(Capistrano::Version::MAJOR) && Capistrano::Version::MAJOR < 2
|
69
89
|
STDERR.puts "Unable to load #{__FILE__}\nNew Relic Capistrano hooks require at least version 2.0.0"
|
70
90
|
else
|
71
91
|
instance = Capistrano::Configuration.instance
|
92
|
+
|
72
93
|
if instance
|
73
94
|
instance.load &make_notify_task
|
74
95
|
else
|
75
96
|
make_notify_task.call
|
76
97
|
end
|
77
98
|
end
|
99
|
+
|
@@ -57,15 +57,24 @@ module NewRelic
|
|
57
57
|
JSON.dump(self.to_array)
|
58
58
|
end
|
59
59
|
|
60
|
+
include NewRelic::Coerce
|
61
|
+
|
60
62
|
def to_array
|
61
|
-
[ @start_time
|
63
|
+
[ float(@start_time),
|
64
|
+
@params[:request_params],
|
65
|
+
@params[:custom_params],
|
62
66
|
@root_segment.to_array ]
|
63
67
|
end
|
64
68
|
|
65
69
|
def to_collector_array(encoder)
|
66
70
|
trace_tree = encoder.encode(self.to_array)
|
67
|
-
[ Helper.time_to_millis(@start_time),
|
68
|
-
|
71
|
+
[ Helper.time_to_millis(@start_time),
|
72
|
+
Helper.time_to_millis(duration),
|
73
|
+
string(@params[:path]),
|
74
|
+
string(@params[:uri]),
|
75
|
+
trace_tree,
|
76
|
+
string(@guid),
|
77
|
+
nil,
|
69
78
|
!!@force_persist ]
|
70
79
|
end
|
71
80
|
|
@@ -33,10 +33,13 @@ module NewRelic
|
|
33
33
|
to_debug_str(0)
|
34
34
|
end
|
35
35
|
|
36
|
+
include NewRelic::Coerce
|
37
|
+
|
36
38
|
def to_array
|
37
|
-
[ (@entry_timestamp
|
38
|
-
(@exit_timestamp
|
39
|
-
@metric_name,
|
39
|
+
[ NewRelic::Helper.time_to_millis(@entry_timestamp),
|
40
|
+
NewRelic::Helper.time_to_millis(@exit_timestamp),
|
41
|
+
string(@metric_name),
|
42
|
+
(@params || {}) ] +
|
40
43
|
[ (@called_segments ? @called_segments.map{|s| s.to_array} : []) ]
|
41
44
|
end
|
42
45
|
|
data/lib/new_relic/version.rb
CHANGED
@@ -2,26 +2,21 @@
|
|
2
2
|
|
3
3
|
module NewRelic
|
4
4
|
module VERSION #:nodoc:
|
5
|
-
def self.
|
6
|
-
|
7
|
-
version_string = if Kernel.const_defined?(:Gem)
|
8
|
-
spec = Gem::Specification.load(path)
|
9
|
-
spec.version.to_s if spec
|
10
|
-
else
|
11
|
-
md = File.read(path).match(/s\.version\s*=\s*"(.*)"/)
|
12
|
-
md[1] if md
|
13
|
-
end
|
14
|
-
version_string && version_string.split('.', 4)[3]
|
15
|
-
end
|
5
|
+
def self.build_version_string(*parts)
|
6
|
+
parts.compact.join('.')
|
16
7
|
end
|
17
8
|
|
18
|
-
GEMSPEC_PATH = File.join(File.dirname(__FILE__), '..', '..', 'newrelic_rpm.gemspec')
|
19
9
|
MAJOR = 3
|
20
10
|
MINOR = 5
|
21
|
-
TINY =
|
22
|
-
|
11
|
+
TINY = 6
|
12
|
+
|
13
|
+
begin
|
14
|
+
require File.join(File.dirname(__FILE__), 'build')
|
15
|
+
rescue LoadError => e
|
16
|
+
BUILD = nil
|
17
|
+
end
|
23
18
|
|
24
|
-
STRING =
|
19
|
+
STRING = build_version_string(MAJOR, MINOR, TINY, BUILD)
|
25
20
|
end
|
26
21
|
|
27
22
|
# Helper class for managing version comparisons
|
data/newrelic.yml
CHANGED
@@ -68,25 +68,12 @@ common: &default_settings
|
|
68
68
|
# Optionally set the name of the log file, defaults to 'newrelic_agent.log'
|
69
69
|
# log_file_name: 'newrelic_agent.log'
|
70
70
|
|
71
|
-
# The newrelic agent communicates with the service via
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
# so it should not impact response times.
|
78
|
-
ssl: false
|
79
|
-
|
80
|
-
# EXPERIMENTAL: enable verification of the SSL certificate sent by
|
81
|
-
# the server. This setting has no effect unless SSL is enabled
|
82
|
-
# above. This may block your application. Only enable it if the data
|
83
|
-
# you send us needs end-to-end verified certificates.
|
84
|
-
#
|
85
|
-
# This means we cannot cache the DNS lookup, so each request to the
|
86
|
-
# service will perform a lookup. It also means that we cannot
|
87
|
-
# use a non-blocking lookup, so in a worst case, if you have DNS
|
88
|
-
# problems, your app may block indefinitely.
|
89
|
-
# verify_certificate: true
|
71
|
+
# The newrelic agent communicates with the service via https by default. This
|
72
|
+
# prevents eavesdropping on the performance metrics transmitted by the agent.
|
73
|
+
# The encryption required by SSL introduces a nominal amount of CPU overhead,
|
74
|
+
# which is performed asynchronously in a background thread. If you'd prefer
|
75
|
+
# to send your metrics over http uncomment the following line.
|
76
|
+
# ssl: false
|
90
77
|
|
91
78
|
#============================== Browser Monitoring ===============================
|
92
79
|
# New Relic Real User Monitoring gives you insight into the performance real users are
|
@@ -108,6 +95,12 @@ common: &default_settings
|
|
108
95
|
# proxy_user:
|
109
96
|
# proxy_pass:
|
110
97
|
|
98
|
+
# The agent can optionally log all data it sends to New Relic servers to a
|
99
|
+
# separate log file for human inspection and auditing purposes. To enable this
|
100
|
+
# feature, change 'enabled' below to true.
|
101
|
+
# See: https://newrelic.com/docs/ruby/audit-log
|
102
|
+
audit_log:
|
103
|
+
enabled: false
|
111
104
|
|
112
105
|
# Tells transaction tracer and error collector (when enabled)
|
113
106
|
# whether or not to capture HTTP params. When true, frameworks can
|
data/newrelic_rpm.gemspec
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
#-*- coding: utf-8 -*-
|
2
|
-
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'new_relic/version'
|
6
|
+
require 'new_relic/latest_changes'
|
3
7
|
|
4
8
|
Gem::Specification.new do |s|
|
5
9
|
s.name = "wd_newrelic_rpm"
|
6
|
-
s.version =
|
10
|
+
s.version = NewRelic::VERSION::STRING
|
7
11
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = [ "Jason Clark", "Sam Goldstein", "Jon Guymon", "Ben Weintraub" ]
|
9
|
-
s.date =
|
12
|
+
s.authors = [ "Jason Clark", "Sam Goldstein", "Michael Granger", "Jon Guymon", "Ben Weintraub" ]
|
13
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
10
14
|
s.description = <<-EOS
|
11
15
|
Weasel Diesel compatible version of rpm.
|
12
16
|
New Relic is a performance management system, developed by New Relic,
|
@@ -25,469 +29,23 @@ EOS
|
|
25
29
|
"GUIDELINES_FOR_CONTRIBUTING.md",
|
26
30
|
"newrelic.yml"
|
27
31
|
]
|
28
|
-
s.files = [
|
29
|
-
".gitignore",
|
30
|
-
".project",
|
31
|
-
".travis.yml",
|
32
|
-
"CHANGELOG",
|
33
|
-
"GUIDELINES_FOR_CONTRIBUTING.md",
|
34
|
-
"Gemfile",
|
35
|
-
"LICENSE",
|
36
|
-
"README.md",
|
37
|
-
"Rakefile",
|
38
|
-
"bin/mongrel_rpm",
|
39
|
-
"bin/newrelic",
|
40
|
-
"bin/newrelic_cmd",
|
41
|
-
"cert/cacert.pem",
|
42
|
-
"cert/oldsite.pem",
|
43
|
-
"cert/site.pem",
|
44
|
-
"config.dot",
|
45
|
-
"config/database.yml",
|
46
|
-
"init.rb",
|
47
|
-
"install.rb",
|
48
|
-
"lib/conditional_vendored_dependency_detection.rb",
|
49
|
-
"lib/conditional_vendored_metric_parser.rb",
|
50
|
-
"lib/new_relic/agent.rb",
|
51
|
-
"lib/new_relic/agent/agent.rb",
|
52
|
-
"lib/new_relic/agent/agent_logger.rb",
|
53
|
-
"lib/new_relic/agent/audit_logger.rb",
|
54
|
-
"lib/new_relic/agent/beacon_configuration.rb",
|
55
|
-
"lib/new_relic/agent/browser_monitoring.rb",
|
56
|
-
"lib/new_relic/agent/busy_calculator.rb",
|
57
|
-
"lib/new_relic/agent/chained_call.rb",
|
58
|
-
"lib/new_relic/agent/configuration.rb",
|
59
|
-
"lib/new_relic/agent/configuration/defaults.rb",
|
60
|
-
"lib/new_relic/agent/configuration/environment_source.rb",
|
61
|
-
"lib/new_relic/agent/configuration/manager.rb",
|
62
|
-
"lib/new_relic/agent/configuration/mask_defaults.rb",
|
63
|
-
"lib/new_relic/agent/configuration/server_source.rb",
|
64
|
-
"lib/new_relic/agent/configuration/yaml_source.rb",
|
65
|
-
"lib/new_relic/agent/cross_process_monitoring.rb",
|
66
|
-
"lib/new_relic/agent/database.rb",
|
67
|
-
"lib/new_relic/agent/error_collector.rb",
|
68
|
-
"lib/new_relic/agent/instrumentation.rb",
|
69
|
-
"lib/new_relic/agent/instrumentation/active_merchant.rb",
|
70
|
-
"lib/new_relic/agent/instrumentation/active_record.rb",
|
71
|
-
"lib/new_relic/agent/instrumentation/acts_as_solr.rb",
|
72
|
-
"lib/new_relic/agent/instrumentation/authlogic.rb",
|
73
|
-
"lib/new_relic/agent/instrumentation/browser_monitoring_timings.rb",
|
74
|
-
"lib/new_relic/agent/instrumentation/controller_instrumentation.rb",
|
75
|
-
"lib/new_relic/agent/instrumentation/data_mapper.rb",
|
76
|
-
"lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb",
|
77
|
-
"lib/new_relic/agent/instrumentation/memcache.rb",
|
78
|
-
"lib/new_relic/agent/instrumentation/merb/controller.rb",
|
79
|
-
"lib/new_relic/agent/instrumentation/merb/errors.rb",
|
80
|
-
"lib/new_relic/agent/instrumentation/metric_frame.rb",
|
81
|
-
"lib/new_relic/agent/instrumentation/metric_frame/pop.rb",
|
82
|
-
"lib/new_relic/agent/instrumentation/net.rb",
|
83
|
-
"lib/new_relic/agent/instrumentation/passenger_instrumentation.rb",
|
84
|
-
"lib/new_relic/agent/instrumentation/queue_time.rb",
|
85
|
-
"lib/new_relic/agent/instrumentation/rack.rb",
|
86
|
-
"lib/new_relic/agent/instrumentation/rails/action_controller.rb",
|
87
|
-
"lib/new_relic/agent/instrumentation/rails/action_web_service.rb",
|
88
|
-
"lib/new_relic/agent/instrumentation/rails/errors.rb",
|
89
|
-
"lib/new_relic/agent/instrumentation/rails3/action_controller.rb",
|
90
|
-
"lib/new_relic/agent/instrumentation/rails3/errors.rb",
|
91
|
-
"lib/new_relic/agent/instrumentation/resque.rb",
|
92
|
-
"lib/new_relic/agent/instrumentation/sinatra.rb",
|
93
|
-
"lib/new_relic/agent/instrumentation/sunspot.rb",
|
94
|
-
"lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb",
|
95
|
-
"lib/new_relic/agent/method_tracer.rb",
|
96
|
-
"lib/new_relic/agent/new_relic_service.rb",
|
97
|
-
"lib/new_relic/agent/pipe_channel_manager.rb",
|
98
|
-
"lib/new_relic/agent/pipe_service.rb",
|
99
|
-
"lib/new_relic/agent/sampler.rb",
|
100
|
-
"lib/new_relic/agent/samplers/cpu_sampler.rb",
|
101
|
-
"lib/new_relic/agent/samplers/delayed_job_sampler.rb",
|
102
|
-
"lib/new_relic/agent/samplers/memory_sampler.rb",
|
103
|
-
"lib/new_relic/agent/samplers/object_sampler.rb",
|
104
|
-
"lib/new_relic/agent/shim_agent.rb",
|
105
|
-
"lib/new_relic/agent/sql_sampler.rb",
|
106
|
-
"lib/new_relic/agent/stats_engine.rb",
|
107
|
-
"lib/new_relic/agent/stats_engine/gc_profiler.rb",
|
108
|
-
"lib/new_relic/agent/stats_engine/metric_stats.rb",
|
109
|
-
"lib/new_relic/agent/stats_engine/samplers.rb",
|
110
|
-
"lib/new_relic/agent/stats_engine/transactions.rb",
|
111
|
-
"lib/new_relic/agent/thread.rb",
|
112
|
-
"lib/new_relic/agent/thread_profiler.rb",
|
113
|
-
"lib/new_relic/agent/transaction_info.rb",
|
114
|
-
"lib/new_relic/agent/transaction_sample_builder.rb",
|
115
|
-
"lib/new_relic/agent/transaction_sampler.rb",
|
116
|
-
"lib/new_relic/agent/worker_loop.rb",
|
117
|
-
"lib/new_relic/collection_helper.rb",
|
118
|
-
"lib/new_relic/command.rb",
|
119
|
-
"lib/new_relic/commands/deployments.rb",
|
120
|
-
"lib/new_relic/commands/install.rb",
|
121
|
-
"lib/new_relic/control.rb",
|
122
|
-
"lib/new_relic/control/class_methods.rb",
|
123
|
-
"lib/new_relic/control/frameworks.rb",
|
124
|
-
"lib/new_relic/control/frameworks/external.rb",
|
125
|
-
"lib/new_relic/control/frameworks/merb.rb",
|
126
|
-
"lib/new_relic/control/frameworks/rails.rb",
|
127
|
-
"lib/new_relic/control/frameworks/rails3.rb",
|
128
|
-
"lib/new_relic/control/frameworks/rails4.rb",
|
129
|
-
"lib/new_relic/control/frameworks/ruby.rb",
|
130
|
-
"lib/new_relic/control/frameworks/sinatra.rb",
|
131
|
-
"lib/new_relic/control/instance_methods.rb",
|
132
|
-
"lib/new_relic/control/instrumentation.rb",
|
133
|
-
"lib/new_relic/control/profiling.rb",
|
134
|
-
"lib/new_relic/control/server_methods.rb",
|
135
|
-
"lib/new_relic/delayed_job_injection.rb",
|
136
|
-
"lib/new_relic/helper.rb",
|
137
|
-
"lib/new_relic/language_support.rb",
|
138
|
-
"lib/new_relic/local_environment.rb",
|
139
|
-
"lib/new_relic/merbtasks.rb",
|
140
|
-
"lib/new_relic/metric_data.rb",
|
141
|
-
"lib/new_relic/metric_spec.rb",
|
142
|
-
"lib/new_relic/metrics.rb",
|
143
|
-
"lib/new_relic/noticed_error.rb",
|
144
|
-
"lib/new_relic/rack.rb",
|
145
|
-
"lib/new_relic/rack/browser_monitoring.rb",
|
146
|
-
"lib/new_relic/rack/developer_mode.rb",
|
147
|
-
"lib/new_relic/rack/error_collector.rb",
|
148
|
-
"lib/new_relic/recipes.rb",
|
149
|
-
"lib/new_relic/stats.rb",
|
150
|
-
"lib/new_relic/timer_lib.rb",
|
151
|
-
"lib/new_relic/transaction_analysis.rb",
|
152
|
-
"lib/new_relic/transaction_analysis/segment_summary.rb",
|
153
|
-
"lib/new_relic/transaction_sample.rb",
|
154
|
-
"lib/new_relic/transaction_sample/composite_segment.rb",
|
155
|
-
"lib/new_relic/transaction_sample/fake_segment.rb",
|
156
|
-
"lib/new_relic/transaction_sample/segment.rb",
|
157
|
-
"lib/new_relic/transaction_sample/summary_segment.rb",
|
158
|
-
"lib/new_relic/url_rule.rb",
|
159
|
-
"lib/new_relic/version.rb",
|
160
|
-
"lib/newrelic_rpm.rb",
|
161
|
-
"lib/tasks/all.rb",
|
162
|
-
"lib/tasks/install.rake",
|
163
|
-
"lib/tasks/tests.rake",
|
164
|
-
"newrelic.yml",
|
165
|
-
"newrelic_rpm.gemspec.erb",
|
166
|
-
"recipes/newrelic.rb",
|
167
|
-
"test/active_record_fixtures.rb",
|
168
|
-
"test/config/newrelic.yml",
|
169
|
-
"test/config/test_control.rb",
|
170
|
-
"test/fixtures/gemspec_no_build.rb",
|
171
|
-
"test/fixtures/gemspec_with_build.rb",
|
172
|
-
"test/fixtures/gemspec_with_build_and_stage.rb",
|
173
|
-
"test/fixtures/proc_cpuinfo.txt",
|
174
|
-
"test/intentional_fail.rb",
|
175
|
-
"test/multiverse/.gitignore",
|
176
|
-
"test/multiverse/README.md",
|
177
|
-
"test/multiverse/lib/multiverse/color.rb",
|
178
|
-
"test/multiverse/lib/multiverse/envfile.rb",
|
179
|
-
"test/multiverse/lib/multiverse/environment.rb",
|
180
|
-
"test/multiverse/lib/multiverse/output_collector.rb",
|
181
|
-
"test/multiverse/lib/multiverse/runner.rb",
|
182
|
-
"test/multiverse/lib/multiverse/suite.rb",
|
183
|
-
"test/multiverse/script/run_one",
|
184
|
-
"test/multiverse/script/runner",
|
185
|
-
"test/multiverse/suites/active_record/Envfile",
|
186
|
-
"test/multiverse/suites/active_record/ar_method_aliasing.rb",
|
187
|
-
"test/multiverse/suites/active_record/config/newrelic.yml",
|
188
|
-
"test/multiverse/suites/active_record/encoding_test.rb",
|
189
|
-
"test/multiverse/suites/agent_only/Envfile",
|
190
|
-
"test/multiverse/suites/agent_only/audit_log_test.rb",
|
191
|
-
"test/multiverse/suites/agent_only/config/newrelic.yml",
|
192
|
-
"test/multiverse/suites/agent_only/http_response_code_test.rb",
|
193
|
-
"test/multiverse/suites/agent_only/marshaling_test.rb",
|
194
|
-
"test/multiverse/suites/agent_only/method_visibility_test.rb",
|
195
|
-
"test/multiverse/suites/agent_only/pipe_manager_test.rb",
|
196
|
-
"test/multiverse/suites/agent_only/service_timeout_test.rb",
|
197
|
-
"test/multiverse/suites/agent_only/test_trace_method_with_punctuation.rb",
|
198
|
-
"test/multiverse/suites/agent_only/test_trace_transaction_with_punctuation.rb",
|
199
|
-
"test/multiverse/suites/agent_only/thread_profiling_test.rb",
|
200
|
-
"test/multiverse/suites/config_file_loading/Envfile",
|
201
|
-
"test/multiverse/suites/config_file_loading/config_file_loading_test.rb",
|
202
|
-
"test/multiverse/suites/datamapper/Envfile",
|
203
|
-
"test/multiverse/suites/datamapper/config/newrelic.yml",
|
204
|
-
"test/multiverse/suites/datamapper/encoding_test.rb",
|
205
|
-
"test/multiverse/suites/logging/Envfile",
|
206
|
-
"test/multiverse/suites/logging/config/newrelic.yml",
|
207
|
-
"test/multiverse/suites/logging/logging_test.rb",
|
208
|
-
"test/multiverse/suites/monitor_mode_false/Envfile",
|
209
|
-
"test/multiverse/suites/monitor_mode_false/config/newrelic.yml",
|
210
|
-
"test/multiverse/suites/monitor_mode_false/no_dns_resolv.rb",
|
211
|
-
"test/multiverse/suites/no_load/Envfile",
|
212
|
-
"test/multiverse/suites/no_load/config/newrelic.yml",
|
213
|
-
"test/multiverse/suites/no_load/start_up_test.rb",
|
214
|
-
"test/multiverse/suites/rails_3_error_tracing/Envfile",
|
215
|
-
"test/multiverse/suites/rails_3_error_tracing/config/newrelic.yml",
|
216
|
-
"test/multiverse/suites/rails_3_error_tracing/error_tracing_test.rb",
|
217
|
-
"test/multiverse/suites/rails_3_gc/Envfile",
|
218
|
-
"test/multiverse/suites/rails_3_gc/config/newrelic.yml",
|
219
|
-
"test/multiverse/suites/rails_3_gc/instrumentation_test.rb",
|
220
|
-
"test/multiverse/suites/rails_3_queue_time/Envfile",
|
221
|
-
"test/multiverse/suites/rails_3_queue_time/config/newrelic.yml",
|
222
|
-
"test/multiverse/suites/rails_3_queue_time/queue_time_test.rb",
|
223
|
-
"test/multiverse/suites/rails_3_views/.gitignore",
|
224
|
-
"test/multiverse/suites/rails_3_views/Envfile",
|
225
|
-
"test/multiverse/suites/rails_3_views/app/views/foos/_foo.html.haml",
|
226
|
-
"test/multiverse/suites/rails_3_views/app/views/test/_a_partial.html.erb",
|
227
|
-
"test/multiverse/suites/rails_3_views/app/views/test/_mid_partial.html.erb",
|
228
|
-
"test/multiverse/suites/rails_3_views/app/views/test/_top_partial.html.erb",
|
229
|
-
"test/multiverse/suites/rails_3_views/app/views/test/deep_partial.html.erb",
|
230
|
-
"test/multiverse/suites/rails_3_views/app/views/test/haml_view.html.haml",
|
231
|
-
"test/multiverse/suites/rails_3_views/app/views/test/index.html.erb",
|
232
|
-
"test/multiverse/suites/rails_3_views/config/newrelic.yml",
|
233
|
-
"test/multiverse/suites/rails_3_views/view_instrumentation_test.rb",
|
234
|
-
"test/multiverse/suites/resque/Envfile",
|
235
|
-
"test/multiverse/suites/resque/config/newrelic.yml",
|
236
|
-
"test/multiverse/suites/resque/dump.rdb",
|
237
|
-
"test/multiverse/suites/resque/instrumentation_test.rb",
|
238
|
-
"test/multiverse/suites/rum_auto_instrumentation/Envfile",
|
239
|
-
"test/multiverse/suites/rum_auto_instrumentation/config/newrelic.yml",
|
240
|
-
"test/multiverse/suites/rum_auto_instrumentation/responses/worst_case_small.html",
|
241
|
-
"test/multiverse/suites/rum_auto_instrumentation/sanity_test.rb",
|
242
|
-
"test/multiverse/suites/sinatra/Envfile",
|
243
|
-
"test/multiverse/suites/sinatra/config/newrelic.yml",
|
244
|
-
"test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb",
|
245
|
-
"test/multiverse/suites/sinatra/sinatra_routes_test.rb",
|
246
|
-
"test/multiverse/suites/sinatra/sinatra_test.rb",
|
247
|
-
"test/multiverse/test/multiverse_test.rb",
|
248
|
-
"test/multiverse/test/suite_examples/one/a/Envfile",
|
249
|
-
"test/multiverse/test/suite_examples/one/a/a_test.rb",
|
250
|
-
"test/multiverse/test/suite_examples/one/a/config/newrelic.yml",
|
251
|
-
"test/multiverse/test/suite_examples/one/b/Envfile",
|
252
|
-
"test/multiverse/test/suite_examples/one/b/b_test.rb",
|
253
|
-
"test/multiverse/test/suite_examples/one/b/config/newrelic.yml",
|
254
|
-
"test/multiverse/test/suite_examples/three/a/Envfile",
|
255
|
-
"test/multiverse/test/suite_examples/three/a/fail_test.rb",
|
256
|
-
"test/multiverse/test/suite_examples/three/b/Envfile",
|
257
|
-
"test/multiverse/test/suite_examples/three/b/win_test.rb",
|
258
|
-
"test/multiverse/test/suite_examples/two/a/Envfile",
|
259
|
-
"test/multiverse/test/suite_examples/two/a/fail_test.rb",
|
260
|
-
"test/new_relic/agent/agent/connect_test.rb",
|
261
|
-
"test/new_relic/agent/agent/start_test.rb",
|
262
|
-
"test/new_relic/agent/agent/start_worker_thread_test.rb",
|
263
|
-
"test/new_relic/agent/agent_logger_test.rb",
|
264
|
-
"test/new_relic/agent/agent_test.rb",
|
265
|
-
"test/new_relic/agent/agent_test_controller.rb",
|
266
|
-
"test/new_relic/agent/agent_test_controller_test.rb",
|
267
|
-
"test/new_relic/agent/apdex_from_server_test.rb",
|
268
|
-
"test/new_relic/agent/audit_logger_test.rb",
|
269
|
-
"test/new_relic/agent/beacon_configuration_test.rb",
|
270
|
-
"test/new_relic/agent/browser_monitoring_test.rb",
|
271
|
-
"test/new_relic/agent/busy_calculator_test.rb",
|
272
|
-
"test/new_relic/agent/configuration/environment_source_test.rb",
|
273
|
-
"test/new_relic/agent/configuration/manager_test.rb",
|
274
|
-
"test/new_relic/agent/configuration/server_source_test.rb",
|
275
|
-
"test/new_relic/agent/configuration/yaml_source_test.rb",
|
276
|
-
"test/new_relic/agent/cross_process_monitoring_test.rb",
|
277
|
-
"test/new_relic/agent/database_test.rb",
|
278
|
-
"test/new_relic/agent/error_collector/notice_error_test.rb",
|
279
|
-
"test/new_relic/agent/error_collector_test.rb",
|
280
|
-
"test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb",
|
281
|
-
"test/new_relic/agent/instrumentation/browser_monitoring_timings_test.rb",
|
282
|
-
"test/new_relic/agent/instrumentation/controller_instrumentation_test.rb",
|
283
|
-
"test/new_relic/agent/instrumentation/instrumentation_test.rb",
|
284
|
-
"test/new_relic/agent/instrumentation/metric_frame/pop_test.rb",
|
285
|
-
"test/new_relic/agent/instrumentation/metric_frame_test.rb",
|
286
|
-
"test/new_relic/agent/instrumentation/net_instrumentation_test.rb",
|
287
|
-
"test/new_relic/agent/instrumentation/queue_time_test.rb",
|
288
|
-
"test/new_relic/agent/instrumentation/rack_test.rb",
|
289
|
-
"test/new_relic/agent/instrumentation/sinatra_test.rb",
|
290
|
-
"test/new_relic/agent/instrumentation/task_instrumentation_test.rb",
|
291
|
-
"test/new_relic/agent/memcache_instrumentation_test.rb",
|
292
|
-
"test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb",
|
293
|
-
"test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb",
|
294
|
-
"test/new_relic/agent/method_tracer_test.rb",
|
295
|
-
"test/new_relic/agent/mock_scope_listener.rb",
|
296
|
-
"test/new_relic/agent/new_relic_service_test.rb",
|
297
|
-
"test/new_relic/agent/pipe_channel_manager_test.rb",
|
298
|
-
"test/new_relic/agent/pipe_service_test.rb",
|
299
|
-
"test/new_relic/agent/rpm_agent_test.rb",
|
300
|
-
"test/new_relic/agent/sampler_test.rb",
|
301
|
-
"test/new_relic/agent/shim_agent_test.rb",
|
302
|
-
"test/new_relic/agent/sql_sampler_test.rb",
|
303
|
-
"test/new_relic/agent/stats_engine/metric_stats/harvest_test.rb",
|
304
|
-
"test/new_relic/agent/stats_engine/metric_stats_test.rb",
|
305
|
-
"test/new_relic/agent/stats_engine/samplers_test.rb",
|
306
|
-
"test/new_relic/agent/stats_engine_test.rb",
|
307
|
-
"test/new_relic/agent/thread_profiler_test.rb",
|
308
|
-
"test/new_relic/agent/thread_test.rb",
|
309
|
-
"test/new_relic/agent/threaded_test.rb",
|
310
|
-
"test/new_relic/agent/transaction_info_test.rb",
|
311
|
-
"test/new_relic/agent/transaction_sample_builder_test.rb",
|
312
|
-
"test/new_relic/agent/transaction_sampler_test.rb",
|
313
|
-
"test/new_relic/agent/worker_loop_test.rb",
|
314
|
-
"test/new_relic/agent_test.rb",
|
315
|
-
"test/new_relic/collection_helper_test.rb",
|
316
|
-
"test/new_relic/command/deployments_test.rb",
|
317
|
-
"test/new_relic/control/class_methods_test.rb",
|
318
|
-
"test/new_relic/control/frameworks/rails_test.rb",
|
319
|
-
"test/new_relic/control_test.rb",
|
320
|
-
"test/new_relic/delayed_job_injection_test.rb",
|
321
|
-
"test/new_relic/dispatcher_test.rb",
|
322
|
-
"test/new_relic/fake_collector.rb",
|
323
|
-
"test/new_relic/fake_service.rb",
|
324
|
-
"test/new_relic/fakes_sending_data.rb",
|
325
|
-
"test/new_relic/framework_test.rb",
|
326
|
-
"test/new_relic/load_test.rb",
|
327
|
-
"test/new_relic/local_environment_test.rb",
|
328
|
-
"test/new_relic/metric_data_test.rb",
|
329
|
-
"test/new_relic/metric_parser/metric_parser_test.rb",
|
330
|
-
"test/new_relic/metric_spec_test.rb",
|
331
|
-
"test/new_relic/noticed_error_test.rb",
|
332
|
-
"test/new_relic/rack/all_test.rb",
|
333
|
-
"test/new_relic/rack/browser_monitoring_test.rb",
|
334
|
-
"test/new_relic/rack/developer_mode_helper_test.rb",
|
335
|
-
"test/new_relic/rack/developer_mode_test.rb",
|
336
|
-
"test/new_relic/rack/error_collector_test.rb",
|
337
|
-
"test/new_relic/stats_test.rb",
|
338
|
-
"test/new_relic/transaction_analysis/segment_summary_test.rb",
|
339
|
-
"test/new_relic/transaction_analysis_test.rb",
|
340
|
-
"test/new_relic/transaction_sample/composite_segment_test.rb",
|
341
|
-
"test/new_relic/transaction_sample/fake_segment_test.rb",
|
342
|
-
"test/new_relic/transaction_sample/segment_test.rb",
|
343
|
-
"test/new_relic/transaction_sample/summary_segment_test.rb",
|
344
|
-
"test/new_relic/transaction_sample_subtest_test.rb",
|
345
|
-
"test/new_relic/transaction_sample_test.rb",
|
346
|
-
"test/new_relic/version_number_test.rb",
|
347
|
-
"test/script/build_test_gem.sh",
|
348
|
-
"test/script/ci.sh",
|
349
|
-
"test/script/ci_agent-tests_runner.sh",
|
350
|
-
"test/script/ci_bench.sh",
|
351
|
-
"test/script/ci_multiverse_runner.sh",
|
352
|
-
"test/test_contexts.rb",
|
353
|
-
"test/test_helper.rb",
|
354
|
-
"ui/helpers/developer_mode_helper.rb",
|
355
|
-
"ui/helpers/google_pie_chart.rb",
|
356
|
-
"ui/views/layouts/newrelic_default.rhtml",
|
357
|
-
"ui/views/newrelic/_explain_plans.rhtml",
|
358
|
-
"ui/views/newrelic/_sample.rhtml",
|
359
|
-
"ui/views/newrelic/_segment.rhtml",
|
360
|
-
"ui/views/newrelic/_segment_limit_message.rhtml",
|
361
|
-
"ui/views/newrelic/_segment_row.rhtml",
|
362
|
-
"ui/views/newrelic/_show_sample_detail.rhtml",
|
363
|
-
"ui/views/newrelic/_show_sample_sql.rhtml",
|
364
|
-
"ui/views/newrelic/_show_sample_summary.rhtml",
|
365
|
-
"ui/views/newrelic/_sql_row.rhtml",
|
366
|
-
"ui/views/newrelic/_stack_trace.rhtml",
|
367
|
-
"ui/views/newrelic/_table.rhtml",
|
368
|
-
"ui/views/newrelic/explain_sql.rhtml",
|
369
|
-
"ui/views/newrelic/file/images/arrow-close.png",
|
370
|
-
"ui/views/newrelic/file/images/arrow-open.png",
|
371
|
-
"ui/views/newrelic/file/images/blue_bar.gif",
|
372
|
-
"ui/views/newrelic/file/images/file_icon.png",
|
373
|
-
"ui/views/newrelic/file/images/gray_bar.gif",
|
374
|
-
"ui/views/newrelic/file/images/new-relic-rpm-desktop.gif",
|
375
|
-
"ui/views/newrelic/file/images/new_relic_rpm_desktop.gif",
|
376
|
-
"ui/views/newrelic/file/images/textmate.png",
|
377
|
-
"ui/views/newrelic/file/javascript/jquery-1.4.2.js",
|
378
|
-
"ui/views/newrelic/file/javascript/transaction_sample.js",
|
379
|
-
"ui/views/newrelic/file/stylesheets/style.css",
|
380
|
-
"ui/views/newrelic/index.rhtml",
|
381
|
-
"ui/views/newrelic/sample_not_found.rhtml",
|
382
|
-
"ui/views/newrelic/show_sample.rhtml",
|
383
|
-
"ui/views/newrelic/show_source.rhtml",
|
384
|
-
"ui/views/newrelic/threads.rhtml",
|
385
|
-
"vendor/gems/dependency_detection-0.0.1.build/LICENSE",
|
386
|
-
"vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb",
|
387
|
-
"vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection/version.rb",
|
388
|
-
"vendor/gems/metric_parser-0.1.0.pre1/.specification",
|
389
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/metric_parser.rb",
|
390
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb",
|
391
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb",
|
392
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb",
|
393
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb",
|
394
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb",
|
395
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb",
|
396
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb",
|
397
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb",
|
398
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb",
|
399
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_ext.rb",
|
400
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb",
|
401
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database_pool.rb",
|
402
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net.rb",
|
403
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net_parser.rb",
|
404
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb",
|
405
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb",
|
406
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/frontend.rb",
|
407
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/gc.rb",
|
408
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/hibernate_session.rb",
|
409
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb",
|
410
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java_parser.rb",
|
411
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp.rb",
|
412
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb",
|
413
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb",
|
414
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb",
|
415
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb",
|
416
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb",
|
417
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb",
|
418
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_context_listener.rb",
|
419
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_filter.rb",
|
420
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb",
|
421
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb",
|
422
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb",
|
423
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring.rb",
|
424
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_controller.rb",
|
425
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_view.rb",
|
426
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_action.rb",
|
427
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_result.rb",
|
428
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/version.rb",
|
429
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb",
|
430
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb",
|
431
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb",
|
432
|
-
"vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb",
|
433
|
-
"newrelic_rpm.gemspec",
|
434
|
-
]
|
435
|
-
s.homepage = "http://www.github.com/newrelic/rpm"
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
s.post_install_message = <<'EOS'
|
440
|
-
|
441
|
-
# New Relic Ruby Agent Release Notes #
|
442
|
-
|
443
|
-
## v3.5.5 ##
|
444
|
-
|
445
|
-
* Add thread profiling support
|
446
|
-
|
447
|
-
Thread profiling performs statistical sampling of backtraces of all threads
|
448
|
-
within your Ruby processes. This feature requires MRI >= 1.9.2, and is
|
449
|
-
controlled via the New Relic web UI. JRuby support (in 1.9.x compat mode) is
|
450
|
-
considered experimental, due to issues with JRuby's Thread#backtrace.
|
451
32
|
|
452
|
-
|
33
|
+
file_list = `git ls-files`.split
|
34
|
+
build_file_path = 'lib/new_relic/build.rb'
|
35
|
+
file_list << build_file_path if File.exist?(build_file_path)
|
36
|
+
s.files = file_list
|
453
37
|
|
454
|
-
|
455
|
-
a special log file for human inspection. This feature is off by default, and
|
456
|
-
can be enabled by setting the audit_log.enabled configuration key to true.
|
457
|
-
You may also control the location of the audit log with the audit_log.path key.
|
458
|
-
|
459
|
-
* Use config system for dispatcher, framework, and config file detection
|
460
|
-
|
461
|
-
Several aspects of the agent's configuration were not being handled by the
|
462
|
-
configuration system. Detection/configuration of the dispatcher (e.g. passenger,
|
463
|
-
unicorn, resque), framework (e.g. rails3, sinatra), and newrelic.yml
|
464
|
-
location are now handled via the Agent environment, manual, and default
|
465
|
-
configuration sources.
|
466
|
-
|
467
|
-
* Updates to logging across the agent
|
468
|
-
|
469
|
-
We've carefully reviewed the logging messages that the agent outputs, adding
|
470
|
-
details in some cases, and removing unnecessary clutter. We've also altered
|
471
|
-
the startup sequence to ensure that we don't spam STDOUT with messages
|
472
|
-
during initialization.
|
473
|
-
|
474
|
-
* Fix passing environment to manual_start()
|
475
|
-
|
476
|
-
Thanks to Justin Hannus. The :env key, when passed to Agent.manual_start,
|
477
|
-
can again be used to specify which section of newrelic.yml is loaded.
|
478
|
-
|
479
|
-
* Rails 4 support
|
480
|
-
|
481
|
-
This release includes preliminary support for Rails 4 as of 4.0.0.beta.
|
482
|
-
Rails 4 is still in development, but the agent should work as expected for
|
483
|
-
people who are experimenting with the beta.
|
484
|
-
|
485
|
-
|
486
|
-
See https://github.com/newrelic/rpm/blob/master/CHANGELOG for a full list of
|
487
|
-
changes.
|
488
|
-
EOS
|
38
|
+
s.homepage = "http://www.github.com/newrelic/rpm"
|
489
39
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "New Relic Ruby Agent"]
|
490
40
|
s.require_paths = ["lib"]
|
491
|
-
s.rubygems_version =
|
41
|
+
s.rubygems_version = Gem::VERSION
|
492
42
|
s.summary = "New Relic Ruby Agent"
|
43
|
+
s.post_install_message = NewRelic::LatestChanges.read
|
44
|
+
|
45
|
+
# Only sign with our private key if you can find it
|
46
|
+
signing_key_path = File.expand_path('~/.ssh/newrelic_rpm-private_key.pem')
|
47
|
+
if File.exists?(signing_key_path)
|
48
|
+
s.signing_key = signing_key_path
|
49
|
+
s.cert_chain = ['gem-public_cert.pem']
|
50
|
+
end
|
493
51
|
end
|