newrelic_rpm 3.12.0.288 → 3.12.1.298
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +42 -0
- data/Rakefile +5 -5
- data/lib/new_relic/agent.rb +23 -11
- data/lib/new_relic/agent/agent.rb +17 -67
- data/lib/new_relic/agent/agent_logger.rb +9 -33
- data/lib/new_relic/agent/attribute_processing.rb +2 -2
- data/lib/new_relic/agent/autostart.rb +1 -18
- data/lib/new_relic/agent/aws_info.rb +90 -0
- data/lib/new_relic/agent/configuration/default_source.rb +45 -16
- data/lib/new_relic/agent/configuration/dotted_hash.rb +0 -2
- data/lib/new_relic/agent/configuration/high_security_source.rb +1 -1
- data/lib/new_relic/agent/configuration/manager.rb +1 -31
- data/lib/new_relic/agent/configuration/server_source.rb +0 -1
- data/lib/new_relic/agent/configuration/yaml_source.rb +26 -7
- data/lib/new_relic/agent/database.rb +5 -5
- data/lib/new_relic/agent/database/postgres_explain_obfuscator.rb +0 -1
- data/lib/new_relic/agent/datastores/metric_helper.rb +15 -3
- data/lib/new_relic/agent/error_collector.rb +28 -18
- data/lib/new_relic/agent/instrumentation/active_record.rb +8 -2
- data/lib/new_relic/agent/instrumentation/active_record_4.rb +1 -0
- data/lib/new_relic/agent/instrumentation/active_record_helper.rb +49 -1
- data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +2 -2
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +9 -0
- data/lib/new_relic/agent/instrumentation/grape.rb +1 -1
- data/lib/new_relic/agent/instrumentation/resque.rb +8 -20
- data/lib/new_relic/agent/instrumentation/sequel.rb +0 -2
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +6 -0
- data/lib/new_relic/agent/log_once.rb +39 -0
- data/lib/new_relic/agent/memory_logger.rb +8 -1
- data/lib/new_relic/agent/method_tracer.rb +5 -1
- data/lib/new_relic/agent/new_relic_service.rb +13 -14
- data/lib/new_relic/agent/samplers/cpu_sampler.rb +1 -0
- data/lib/new_relic/agent/samplers/memory_sampler.rb +6 -3
- data/lib/new_relic/agent/sql_sampler.rb +4 -15
- data/lib/new_relic/agent/stats_engine/metric_stats.rb +1 -1
- data/lib/new_relic/agent/stats_engine/samplers.rb +0 -6
- data/lib/new_relic/agent/stats_engine/stats_hash.rb +92 -35
- data/lib/new_relic/agent/system_info.rb +53 -6
- data/lib/new_relic/agent/transaction.rb +4 -13
- data/lib/new_relic/agent/transaction/attributes.rb +2 -0
- data/lib/new_relic/agent/transaction/trace_node.rb +1 -1
- data/lib/new_relic/agent/transaction_event_aggregator.rb +1 -9
- data/lib/new_relic/agent/transaction_sample_builder.rb +0 -6
- data/lib/new_relic/agent/transaction_sampler.rb +1 -13
- data/lib/new_relic/agent/utilization_data.rb +29 -42
- data/lib/new_relic/agent/worker_loop.rb +2 -3
- data/lib/new_relic/cli/commands/deployments.rb +5 -0
- data/lib/new_relic/coerce.rb +1 -1
- data/lib/new_relic/collection_helper.rb +0 -2
- data/lib/new_relic/control/instance_methods.rb +4 -1
- data/lib/new_relic/control/instrumentation.rb +1 -9
- data/lib/new_relic/control/server_methods.rb +3 -56
- data/lib/new_relic/helper.rb +1 -0
- data/lib/new_relic/language_support.rb +21 -0
- data/lib/new_relic/local_environment.rb +1 -0
- data/lib/new_relic/metric_data.rb +1 -1
- data/lib/new_relic/noticed_error.rb +1 -1
- data/lib/new_relic/rack/agent_middleware.rb +9 -0
- data/lib/new_relic/version.rb +1 -1
- data/lib/sequel/extensions/newrelic_instrumentation.rb +2 -2
- data/lib/tasks/multiverse.rake +2 -0
- data/lib/tasks/multiverse.rb +50 -0
- data/test/agent_helper.rb +24 -5
- data/test/fixtures/cross_agent_tests/aws.json +218 -0
- data/test/fixtures/cross_agent_tests/docker_container_id/cases.json +40 -11
- data/test/fixtures/cross_agent_tests/docker_container_id/invalid-characters.txt +9 -0
- data/test/fixtures/cross_agent_tests/docker_container_id/invalid-length.txt +9 -0
- data/test/multiverse/lib/multiverse/suite.rb +3 -0
- data/test/multiverse/suites/active_record/Envfile +18 -12
- data/test/multiverse/suites/active_record/active_record_test.rb +203 -9
- data/test/multiverse/suites/active_record/app/models/models.rb +16 -9
- data/test/multiverse/suites/active_record/config/database.rb +3 -2
- data/test/multiverse/suites/active_record/db/migrate/20150413011200_add_timestamps_to_orders.rb +16 -0
- data/test/multiverse/suites/active_record/db/migrate/20150414084400_create_groups.rb +21 -0
- data/test/multiverse/suites/agent_only/agent_attributes_test.rb +26 -3
- data/test/multiverse/suites/agent_only/config/newrelic.yml +1 -1
- data/test/multiverse/suites/agent_only/script/public_api_when_disabled.rb +68 -0
- data/test/multiverse/suites/agent_only/service_timeout_test.rb +1 -1
- data/test/multiverse/suites/agent_only/ssl_test.rb +2 -1
- data/test/multiverse/suites/agent_only/start_up_test.rb +20 -1
- data/test/multiverse/suites/agent_only/utilization_data_collection_test.rb +43 -104
- data/test/multiverse/suites/bare/standalone_instrumentation_test.rb +2 -2
- data/test/multiverse/suites/high_security/high_security_test.rb +2 -2
- data/test/multiverse/suites/rack/http_response_code_test.rb +4 -4
- data/test/multiverse/suites/rails/error_tracing_test.rb +1 -1
- data/test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb +38 -0
- data/test/multiverse/suites/sidekiq/test_worker.rb +13 -1
- data/test/new_relic/agent/agent_test.rb +0 -70
- data/test/new_relic/agent/attribute_processing_test.rb +10 -5
- data/test/new_relic/agent/autostart_test.rb +0 -31
- data/test/new_relic/agent/aws_info_test.rb +61 -0
- data/test/new_relic/agent/configuration/manager_test.rb +1 -1
- data/test/new_relic/agent/configuration/yaml_source_test.rb +25 -1
- data/test/new_relic/agent/database_test.rb +16 -15
- data/test/new_relic/agent/datastores/metric_helper_test.rb +35 -0
- data/test/new_relic/agent/error_collector_test.rb +28 -5
- data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +23 -20
- data/test/new_relic/agent/memory_logger_test.rb +18 -0
- data/test/new_relic/agent/new_relic_service_test.rb +2 -9
- data/test/new_relic/agent/rpm_agent_test.rb +0 -10
- data/test/new_relic/agent/sql_sampler_test.rb +4 -4
- data/test/new_relic/agent/stats_engine/stats_hash_test.rb +18 -22
- data/test/new_relic/agent/system_info_test.rb +81 -23
- data/test/new_relic/agent/transaction_event_aggregator_test.rb +0 -7
- data/test/new_relic/agent/transaction_test.rb +1 -1
- data/test/new_relic/agent/utilization_data_test.rb +135 -6
- data/test/new_relic/cli/commands/deployments_test.rb +12 -2
- data/test/new_relic/control/instrumentation_test.rb +0 -15
- data/test/new_relic/control_test.rb +0 -63
- data/test/new_relic/fake_collector.rb +4 -17
- data/test/new_relic/language_support_test.rb +30 -0
- data/test/new_relic/license_test.rb +2 -0
- data/test/new_relic/multiverse_helpers.rb +12 -0
- data/test/performance/suites/stats_hash.rb +6 -5
- data/test/test_helper.rb +1 -2
- metadata +13 -4
- data/lib/new_relic/agent/shim_agent.rb +0 -33
- data/test/new_relic/agent/shim_agent_test.rb +0 -20
@@ -15,7 +15,8 @@ class NewRelic::Cli::DeploymentsTest < Minitest::Test
|
|
15
15
|
def info(message); @messages = @messages ? @messages + message : message; end
|
16
16
|
def just_exit(status=0); @exit_status ||= status; end
|
17
17
|
end
|
18
|
-
@config = { :license_key => 'a' * 40
|
18
|
+
@config = { :license_key => 'a' * 40,
|
19
|
+
:config_path => 'test/config/newrelic.yml' }
|
19
20
|
NewRelic::Agent.config.add_config_for_testing(@config)
|
20
21
|
end
|
21
22
|
|
@@ -76,12 +77,21 @@ class NewRelic::Cli::DeploymentsTest < Minitest::Test
|
|
76
77
|
def test_error_if_no_license_key
|
77
78
|
with_config(:license_key => '') do
|
78
79
|
assert_raises NewRelic::Cli::Command::CommandFailure do
|
79
|
-
|
80
|
+
deployment = NewRelic::Cli::Deployments.new(%w[-a APP -r 3838 --user=Bill] << "Some lengthy description")
|
80
81
|
deployment.run
|
81
82
|
end
|
82
83
|
end
|
83
84
|
end
|
84
85
|
|
86
|
+
def test_error_if_failed_yaml
|
87
|
+
NewRelic::Agent::Configuration::YamlSource.any_instance.stubs(:failed?).returns(true)
|
88
|
+
|
89
|
+
assert_raises NewRelic::Cli::Command::CommandFailure do
|
90
|
+
deployment = NewRelic::Cli::Deployments.new(%w[-a APP -r 3838 --user=Bill] << "Some lengthy description")
|
91
|
+
deployment.run
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
85
95
|
def test_with_specified_license_key
|
86
96
|
mock_the_connection
|
87
97
|
@deployment = NewRelic::Cli::Deployments.new(:appname => 'APP',
|
@@ -38,19 +38,4 @@ class NewRelic::Control::InstrumentationTest < Minitest::Test
|
|
38
38
|
result = @test_class.instance_variable_get(:@instrumentation_files)
|
39
39
|
assert_equal [expected_pattern], result
|
40
40
|
end
|
41
|
-
|
42
|
-
def test_install_shim_logs_if_instrumentation_has_already_been_installed
|
43
|
-
@test_class.instance_eval { @instrumented = true }
|
44
|
-
expects_logging(:error, includes('Cannot install'))
|
45
|
-
@test_class.install_shim
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_install_shim_does_not_set_agent_if_already_instrumented
|
49
|
-
fake_shim = "Instrumentation Test Shim Agent"
|
50
|
-
@test_class.instance_eval { @instrumented = true }
|
51
|
-
NewRelic::Agent::ShimAgent.class_eval { @instance = fake_shim }
|
52
|
-
|
53
|
-
@test_class.install_shim
|
54
|
-
refute_equal NewRelic::Agent.agent, fake_shim
|
55
|
-
end
|
56
41
|
end
|
@@ -35,36 +35,6 @@ class NewRelic::ControlTest < Minitest::Test
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
def test_resolve_ip_for_localhost
|
39
|
-
with_config(:ssl => false) do
|
40
|
-
assert_equal nil, control.send(:convert_to_ip_address, 'localhost')
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_resolve_ip_for_non_existent_domain
|
45
|
-
with_config(:ssl => false) do
|
46
|
-
Resolv.stubs(:getaddress).raises(Resolv::ResolvError)
|
47
|
-
IPSocket.stubs(:getaddress).raises(SocketError)
|
48
|
-
assert_equal nil, control.send(:convert_to_ip_address, 'q1239988737.us')
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_resolves_valid_ip
|
53
|
-
with_config(:ssl => false) do
|
54
|
-
Resolv.stubs(:getaddress).with('collector.newrelic.com').returns('204.93.223.153')
|
55
|
-
assert_equal '204.93.223.153', control.send(:convert_to_ip_address, 'collector.newrelic.com')
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
def test_do_not_resolve_if_we_need_to_verify_a_cert
|
60
|
-
with_config(:ssl => false) do
|
61
|
-
assert_equal nil, control.send(:convert_to_ip_address, 'localhost')
|
62
|
-
end
|
63
|
-
with_config(:ssl => true) do
|
64
|
-
assert_equal 'localhost', control.send(:convert_to_ip_address, 'localhost')
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
38
|
def test_api_server_uses_configured_values
|
69
39
|
control.instance_variable_set(:@api_server, nil)
|
70
40
|
with_config(:api_host => 'somewhere', :api_port => 8080) do
|
@@ -73,14 +43,6 @@ class NewRelic::ControlTest < Minitest::Test
|
|
73
43
|
end
|
74
44
|
end
|
75
45
|
|
76
|
-
def test_proxy_server_uses_configured_values
|
77
|
-
control.instance_variable_set(:@proxy_server, nil)
|
78
|
-
with_config(:proxy_host => 'proxytown', :proxy_port => 81) do
|
79
|
-
assert_equal 'proxytown', control.proxy_server.name
|
80
|
-
assert_equal 81, control.proxy_server.port
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
46
|
def test_server_from_host_uses_configured_values
|
85
47
|
with_config(:host => 'donkeytown', :port => 8080) do
|
86
48
|
assert_equal 'donkeytown', control.server_from_host.name
|
@@ -88,31 +50,6 @@ class NewRelic::ControlTest < Minitest::Test
|
|
88
50
|
end
|
89
51
|
end
|
90
52
|
|
91
|
-
class FakeResolv
|
92
|
-
def self.getaddress(host)
|
93
|
-
raise 'deliberately broken'
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_resolve_ip_with_broken_dns
|
98
|
-
# Here be dragons: disable the ruby DNS lookup methods we use so
|
99
|
-
# that it will actually fail to resolve.
|
100
|
-
old_resolv = Resolv
|
101
|
-
old_ipsocket = IPSocket
|
102
|
-
Object.instance_eval { remove_const :Resolv}
|
103
|
-
Object.instance_eval {remove_const:'IPSocket' }
|
104
|
-
|
105
|
-
with_config(:ssl => false) do
|
106
|
-
assert_equal(nil, control.send(:convert_to_ip_address, 'collector.newrelic.com'), "DNS is down, should be no IP for server")
|
107
|
-
end
|
108
|
-
|
109
|
-
Object.instance_eval {const_set('Resolv', old_resolv); const_set('IPSocket', old_ipsocket)}
|
110
|
-
# these are here to make sure that the constant tomfoolery above
|
111
|
-
# has not broket the system unduly
|
112
|
-
assert_equal old_resolv, Resolv
|
113
|
-
assert_equal old_ipsocket, IPSocket
|
114
|
-
end
|
115
|
-
|
116
53
|
def test_transaction_threshold__override
|
117
54
|
with_config(:transaction_tracer => { :transaction_threshold => 1}) do
|
118
55
|
assert_equal 1, NewRelic::Agent.config[:'transaction_tracer.transaction_threshold']
|
@@ -71,7 +71,6 @@ module NewRelic
|
|
71
71
|
'shutdown' => Response.new(200, {'return_value' => nil}),
|
72
72
|
'analytic_event_data' => Response.new(200, {'return_value' => nil}),
|
73
73
|
'custom_event_data' => Response.new(200, {'return_value' => nil}),
|
74
|
-
'utilization_data' => Response.new(200, {'return_value' => nil}),
|
75
74
|
}
|
76
75
|
reset
|
77
76
|
end
|
@@ -207,8 +206,6 @@ module NewRelic
|
|
207
206
|
AnalyticEventDataPost.new(opts)
|
208
207
|
when 'error_data'
|
209
208
|
ErrorDataPost.new(opts)
|
210
|
-
when 'utilization_data'
|
211
|
-
UtilizationDataPost.new(opts)
|
212
209
|
else
|
213
210
|
new(opts)
|
214
211
|
end
|
@@ -248,6 +245,10 @@ module NewRelic
|
|
248
245
|
super
|
249
246
|
@body = @body[0]
|
250
247
|
end
|
248
|
+
|
249
|
+
def utilization
|
250
|
+
@body["utilization"]
|
251
|
+
end
|
251
252
|
end
|
252
253
|
|
253
254
|
class ProfileDataPost < AgentPost
|
@@ -355,20 +356,6 @@ module NewRelic
|
|
355
356
|
end
|
356
357
|
end
|
357
358
|
|
358
|
-
class UtilizationDataPost < AgentPost
|
359
|
-
|
360
|
-
attr_reader :hostname, :container_id, :cpu_count, :instance_type
|
361
|
-
|
362
|
-
def initialize(opts={})
|
363
|
-
super
|
364
|
-
@hostname, @container_id, @cpu_count, @instance_type = body
|
365
|
-
end
|
366
|
-
|
367
|
-
def ==(other)
|
368
|
-
@body == other.body
|
369
|
-
end
|
370
|
-
end
|
371
|
-
|
372
359
|
class SubmittedError
|
373
360
|
|
374
361
|
attr_reader :timestamp, :path, :message, :exception_class_name, :params
|
@@ -71,4 +71,34 @@ class NewRelic::LanguageSupportTest < Minitest::Test
|
|
71
71
|
::GC::Profiler.stubs(:enabled?).returns(true)
|
72
72
|
assert_equal false, NewRelic::LanguageSupport.gc_profiler_enabled?
|
73
73
|
end
|
74
|
+
|
75
|
+
module ::Outer
|
76
|
+
class Included
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class ::Excluded
|
81
|
+
end
|
82
|
+
|
83
|
+
module ::ContainsAnObject
|
84
|
+
class ContainedObject
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_should_look_within_module
|
89
|
+
assert_equal ::Outer::Included, NewRelic::LanguageSupport.constantize("Outer::Included")
|
90
|
+
end
|
91
|
+
|
92
|
+
def test_shouldnt_look_outside_module_for_class
|
93
|
+
assert_equal nil, NewRelic::LanguageSupport.constantize("Outer::Excluded")
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_shouldnt_look_outside_module_for_module
|
97
|
+
assert_equal nil, NewRelic::LanguageSupport.constantize("Outer::Outer")
|
98
|
+
end
|
99
|
+
|
100
|
+
def test_should_allow_object_in_module_names
|
101
|
+
assert_equal ::ContainsAnObject::ContainedObject,
|
102
|
+
NewRelic::LanguageSupport.constantize("ContainsAnObject::ContainedObject")
|
103
|
+
end
|
74
104
|
end
|
@@ -44,6 +44,8 @@ class LicenseTest < Minitest::Test
|
|
44
44
|
['/test/new_relic/agent/agent_test_controller_test.rb', 'Apache'] => 1, # apache header tests
|
45
45
|
['/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb', 'Apache'] => 2, # parse apache solr metrics
|
46
46
|
['/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb', 'Apache'] => 1, # parse apache solr metrics
|
47
|
+
['/lib/new_relic/agent/system_info.rb', 'BSD'] => 4,
|
48
|
+
['/test/new_relic/agent/system_info_test.rb', 'BSD'] => 2
|
47
49
|
}
|
48
50
|
|
49
51
|
def shebang
|
@@ -156,6 +156,11 @@ module MultiverseHelpers
|
|
156
156
|
$collector.calls_for("analytic_event_data").first.events.first
|
157
157
|
end
|
158
158
|
|
159
|
+
def single_connect_posted
|
160
|
+
assert_equal 1, $collector.calls_for(:connect).size
|
161
|
+
$collector.calls_for(:connect).first
|
162
|
+
end
|
163
|
+
|
159
164
|
def capture_js_data
|
160
165
|
state = NewRelic::Agent::TransactionState.tl_get
|
161
166
|
events = stub(:subscribe => nil)
|
@@ -241,6 +246,13 @@ module MultiverseHelpers
|
|
241
246
|
assert_nil @js_agent_attributes
|
242
247
|
end
|
243
248
|
|
249
|
+
def refute_event_has_attribute(key)
|
250
|
+
evt = single_event_posted
|
251
|
+
refute_includes evt[0], key, "Found unexpected attribute #{key} in txn event intrinsics"
|
252
|
+
refute_includes evt[1], key, "Found unexpected attribute #{key} in txn event custom attributes"
|
253
|
+
refute_includes evt[2], key, "Found unexpected attribute #{key} in txn event agent attributes"
|
254
|
+
end
|
255
|
+
|
244
256
|
def attributes_for_single_error_posted(key)
|
245
257
|
run_harvest
|
246
258
|
single_error_posted.params[key]
|
@@ -5,22 +5,23 @@
|
|
5
5
|
class StatsHashPerfTest < Performance::TestCase
|
6
6
|
def setup
|
7
7
|
@hash = NewRelic::Agent::StatsHash.new
|
8
|
+
@specs = (1..100).map { |i| NewRelic::MetricSpec.new("foo#{i}") }
|
8
9
|
end
|
9
10
|
|
10
11
|
def test_record
|
11
12
|
measure do
|
12
13
|
hash = NewRelic::Agent::StatsHash.new
|
13
|
-
|
14
|
-
hash.record(
|
14
|
+
@specs.each do |spec|
|
15
|
+
hash.record(spec, 1)
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
19
20
|
def test_merge
|
20
21
|
measure do
|
21
|
-
incoming =
|
22
|
-
|
23
|
-
incoming
|
22
|
+
incoming = NewRelic::Agent::StatsHash.new
|
23
|
+
@specs.each do |i|
|
24
|
+
incoming.record(NewRelic::MetricSpec.new("foo#{i}"), 1)
|
24
25
|
end
|
25
26
|
|
26
27
|
hash = NewRelic::Agent::StatsHash.new
|
data/test/test_helper.rb
CHANGED
@@ -122,7 +122,6 @@ def default_service(stubbed_method_overrides = {})
|
|
122
122
|
:get_agent_commands => [],
|
123
123
|
:agent_command_results => nil,
|
124
124
|
:analytic_event_data => nil,
|
125
|
-
:utilization_data => nil,
|
126
125
|
:valid_to_marshal? => true
|
127
126
|
}
|
128
127
|
|
@@ -235,7 +234,7 @@ module TransactionSampleTestHelper
|
|
235
234
|
sampler = NewRelic::Agent.instance.transaction_sampler
|
236
235
|
sampler.notice_push_frame(state, "a")
|
237
236
|
explainer = NewRelic::Agent::Instrumentation::ActiveRecord::EXPLAINER
|
238
|
-
sql.each {|sql_statement| sampler.notice_sql(sql_statement, {:adapter => "mysql"}, 0, state,
|
237
|
+
sql.each {|sql_statement| sampler.notice_sql(sql_statement, {:adapter => "mysql"}, 0, state, explainer) }
|
239
238
|
sleep 0.02
|
240
239
|
yield if block_given?
|
241
240
|
sampler.notice_pop_frame(state, "a")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.12.
|
4
|
+
version: 3.12.1.298
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Clark
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|
@@ -232,6 +232,7 @@ files:
|
|
232
232
|
- lib/new_relic/agent/attribute_processing.rb
|
233
233
|
- lib/new_relic/agent/audit_logger.rb
|
234
234
|
- lib/new_relic/agent/autostart.rb
|
235
|
+
- lib/new_relic/agent/aws_info.rb
|
235
236
|
- lib/new_relic/agent/busy_calculator.rb
|
236
237
|
- lib/new_relic/agent/chained_call.rb
|
237
238
|
- lib/new_relic/agent/commands/agent_command.rb
|
@@ -334,6 +335,7 @@ files:
|
|
334
335
|
- lib/new_relic/agent/instrumentation/typhoeus.rb
|
335
336
|
- lib/new_relic/agent/internal_agent_error.rb
|
336
337
|
- lib/new_relic/agent/javascript_instrumentor.rb
|
338
|
+
- lib/new_relic/agent/log_once.rb
|
337
339
|
- lib/new_relic/agent/memory_logger.rb
|
338
340
|
- lib/new_relic/agent/method_tracer.rb
|
339
341
|
- lib/new_relic/agent/method_tracer_helpers.rb
|
@@ -358,7 +360,6 @@ files:
|
|
358
360
|
- lib/new_relic/agent/samplers/memory_sampler.rb
|
359
361
|
- lib/new_relic/agent/samplers/object_sampler.rb
|
360
362
|
- lib/new_relic/agent/samplers/vm_sampler.rb
|
361
|
-
- lib/new_relic/agent/shim_agent.rb
|
362
363
|
- lib/new_relic/agent/sized_buffer.rb
|
363
364
|
- lib/new_relic/agent/sql_sampler.rb
|
364
365
|
- lib/new_relic/agent/stats.rb
|
@@ -451,6 +452,8 @@ files:
|
|
451
452
|
- lib/tasks/config.rake
|
452
453
|
- lib/tasks/config.text.erb
|
453
454
|
- lib/tasks/install.rake
|
455
|
+
- lib/tasks/multiverse.rake
|
456
|
+
- lib/tasks/multiverse.rb
|
454
457
|
- lib/tasks/tests.rake
|
455
458
|
- lib/tasks/versions.html.erb
|
456
459
|
- lib/tasks/versions.rake
|
@@ -546,6 +549,7 @@ files:
|
|
546
549
|
- test/environments/rails42/db/schema.rb
|
547
550
|
- test/fixtures/cross_agent_tests/README.md
|
548
551
|
- test/fixtures/cross_agent_tests/attribute_configuration.json
|
552
|
+
- test/fixtures/cross_agent_tests/aws.json
|
549
553
|
- test/fixtures/cross_agent_tests/cat_map.json
|
550
554
|
- test/fixtures/cross_agent_tests/docker_container_id/README.md
|
551
555
|
- test/fixtures/cross_agent_tests/docker_container_id/cases.json
|
@@ -557,6 +561,8 @@ files:
|
|
557
561
|
- test/fixtures/cross_agent_tests/docker_container_id/docker-1.3.txt
|
558
562
|
- test/fixtures/cross_agent_tests/docker_container_id/empty.txt
|
559
563
|
- test/fixtures/cross_agent_tests/docker_container_id/heroku.txt
|
564
|
+
- test/fixtures/cross_agent_tests/docker_container_id/invalid-characters.txt
|
565
|
+
- test/fixtures/cross_agent_tests/docker_container_id/invalid-length.txt
|
560
566
|
- test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.04-lxc-container.txt
|
561
567
|
- test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.04-no-container.txt
|
562
568
|
- test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.10-no-container.txt
|
@@ -730,6 +736,8 @@ files:
|
|
730
736
|
- test/multiverse/suites/active_record/config/newrelic.yml
|
731
737
|
- test/multiverse/suites/active_record/db/migrate/20141105131800_create_users_and_aliases.rb
|
732
738
|
- test/multiverse/suites/active_record/db/migrate/20141106082200_create_orders_and_shipments.rb
|
739
|
+
- test/multiverse/suites/active_record/db/migrate/20150413011200_add_timestamps_to_orders.rb
|
740
|
+
- test/multiverse/suites/active_record/db/migrate/20150414084400_create_groups.rb
|
733
741
|
- test/multiverse/suites/activemerchant/Envfile
|
734
742
|
- test/multiverse/suites/activemerchant/activemerchant_test.rb
|
735
743
|
- test/multiverse/suites/agent_only/Envfile
|
@@ -755,6 +763,7 @@ files:
|
|
755
763
|
- test/multiverse/suites/agent_only/rum_instrumentation_test.rb
|
756
764
|
- test/multiverse/suites/agent_only/script/env_change.rb
|
757
765
|
- test/multiverse/suites/agent_only/script/loading.rb
|
766
|
+
- test/multiverse/suites/agent_only/script/public_api_when_disabled.rb
|
758
767
|
- test/multiverse/suites/agent_only/script/symbol_env.rb
|
759
768
|
- test/multiverse/suites/agent_only/service_timeout_test.rb
|
760
769
|
- test/multiverse/suites/agent_only/set_transaction_name_test.rb
|
@@ -944,6 +953,7 @@ files:
|
|
944
953
|
- test/new_relic/agent/attribute_processing_test.rb
|
945
954
|
- test/new_relic/agent/audit_logger_test.rb
|
946
955
|
- test/new_relic/agent/autostart_test.rb
|
956
|
+
- test/new_relic/agent/aws_info_test.rb
|
947
957
|
- test/new_relic/agent/busy_calculator_test.rb
|
948
958
|
- test/new_relic/agent/commands/agent_command_router_test.rb
|
949
959
|
- test/new_relic/agent/commands/agent_command_test.rb
|
@@ -1018,7 +1028,6 @@ files:
|
|
1018
1028
|
- test/new_relic/agent/sampler_test.rb
|
1019
1029
|
- test/new_relic/agent/samplers/cpu_sampler_test.rb
|
1020
1030
|
- test/new_relic/agent/samplers/vm_sampler_test.rb
|
1021
|
-
- test/new_relic/agent/shim_agent_test.rb
|
1022
1031
|
- test/new_relic/agent/sized_buffer_test.rb
|
1023
1032
|
- test/new_relic/agent/sql_sampler_test.rb
|
1024
1033
|
- test/new_relic/agent/stats_engine/gc_profiler_test.rb
|
@@ -1,33 +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
|
-
# This agent is loaded by the plug when the plug-in is disabled
|
6
|
-
# It recreates just enough of the API to not break any clients that
|
7
|
-
# invoke the Agent.
|
8
|
-
module NewRelic
|
9
|
-
module Agent
|
10
|
-
class ShimAgent < NewRelic::Agent::Agent
|
11
|
-
def self.instance
|
12
|
-
@instance ||= self.new
|
13
|
-
end
|
14
|
-
|
15
|
-
def initialize
|
16
|
-
super
|
17
|
-
@stats_engine.extend NewRelic::Agent::StatsEngine::Shim
|
18
|
-
@transaction_sampler.extend NewRelic::Agent::TransactionSampler::Shim
|
19
|
-
@sql_sampler.extend NewRelic::Agent::SqlSampler::Shim
|
20
|
-
@error_collector.extend NewRelic::Agent::ErrorCollector::Shim
|
21
|
-
end
|
22
|
-
|
23
|
-
def after_fork *args; end
|
24
|
-
def start *args; end
|
25
|
-
def shutdown *args; end
|
26
|
-
def merge_data_for_endpoint *args; end
|
27
|
-
def push_trace_execution_flag *args; end
|
28
|
-
def pop_trace_execution_flag *args; end
|
29
|
-
def browser_timing_header; "" end
|
30
|
-
def browser_timing_footer; "" end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,20 +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 File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
6
|
-
module NewRelic
|
7
|
-
module Agent
|
8
|
-
class ShimAgentTest < Minitest::Test
|
9
|
-
|
10
|
-
def setup
|
11
|
-
super
|
12
|
-
@agent = NewRelic::Agent::ShimAgent.new
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_merge_data_for_endpoint
|
16
|
-
assert_equal(nil, @agent.merge_data_for_endpoint(:diggle, mock('metric data')))
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|