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
@@ -148,26 +148,6 @@ class NewRelic::Agent::StatsTest < Minitest::Test
|
|
148
148
|
assert_equal(s3.sum_of_squares, 4*4 + 7*7 + 13*13 + 16*16, "check sum of squares")
|
149
149
|
end
|
150
150
|
|
151
|
-
def test_chained_stats_proxies_calls_to_scoped_and_unscoped
|
152
|
-
scoped_stats = NewRelic::Agent::Stats.new
|
153
|
-
unscoped_stats = NewRelic::Agent::Stats.new
|
154
|
-
chained_stats = NewRelic::Agent::ChainedStats.new(scoped_stats, unscoped_stats)
|
155
|
-
chained_stats.record_data_point(42)
|
156
|
-
assert_equal(1, scoped_stats.call_count)
|
157
|
-
assert_equal(1, unscoped_stats.call_count)
|
158
|
-
assert_equal(42, scoped_stats.total_call_time)
|
159
|
-
assert_equal(42, unscoped_stats.total_call_time)
|
160
|
-
end
|
161
|
-
|
162
|
-
def test_chained_stats_returns_values_from_scoped
|
163
|
-
scoped_stats = NewRelic::Agent::Stats.new
|
164
|
-
unscoped_stats = NewRelic::Agent::Stats.new
|
165
|
-
chained_stats = NewRelic::Agent::ChainedStats.new(scoped_stats, unscoped_stats)
|
166
|
-
scoped_stats.record_data_point(42)
|
167
|
-
assert_equal(1, chained_stats.call_count)
|
168
|
-
assert_equal(42, chained_stats.total_call_time)
|
169
|
-
end
|
170
|
-
|
171
151
|
def test_to_json_enforces_float_values
|
172
152
|
s1 = NewRelic::Agent::Stats.new
|
173
153
|
s1.trace_call 3.to_r
|
@@ -127,11 +127,8 @@ class NewRelic::Agent::TracedMethodStackTest < Minitest::Test
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def test_sampler_enabling
|
130
|
-
assert_sampler_enabled_with(true, :'transaction_tracer.enabled' => true
|
131
|
-
assert_sampler_enabled_with(
|
132
|
-
assert_sampler_enabled_with(true, :'transaction_tracer.enabled' => true, :developer_mode => true)
|
133
|
-
|
134
|
-
assert_sampler_enabled_with(false, :'transaction_tracer.enabled' => false, :developer_mode => false)
|
130
|
+
assert_sampler_enabled_with(true, :'transaction_tracer.enabled' => true)
|
131
|
+
assert_sampler_enabled_with(false, :'transaction_tracer.enabled' => false)
|
135
132
|
end
|
136
133
|
|
137
134
|
def test_fetch_matching_frame_fetches_the_next_matching_frame
|
@@ -48,6 +48,11 @@ module NewRelic
|
|
48
48
|
assert_equal "External/remotehost.com/Typhoeus/GET", segment.name
|
49
49
|
end
|
50
50
|
|
51
|
+
def test_downcases_hostname
|
52
|
+
segment = ExternalRequestSegment.new "Typhoeus", "http://ReMoTeHoSt.Com/blogs/index", "GET"
|
53
|
+
assert_equal "External/remotehost.com/Typhoeus/GET", segment.name
|
54
|
+
end
|
55
|
+
|
51
56
|
def test_segment_does_not_record_metrics_outside_of_txn
|
52
57
|
segment = ExternalRequestSegment.new "Net::HTTP", "http://remotehost.com/blogs/index", "GET"
|
53
58
|
segment.finish
|
@@ -280,25 +280,6 @@ class NewRelic::Agent::Transaction::TraceNodeTest < Minitest::Test
|
|
280
280
|
end
|
281
281
|
end
|
282
282
|
|
283
|
-
def test_find_node_default
|
284
|
-
s = NewRelic::Agent::Transaction::TraceNode.new(Time.now, 'Custom/test/metric')
|
285
|
-
id_to_find = s.object_id
|
286
|
-
# should return itself in the base case
|
287
|
-
assert_equal(s, s.find_node(id_to_find))
|
288
|
-
end
|
289
|
-
|
290
|
-
def test_find_node_not_found
|
291
|
-
s = NewRelic::Agent::Transaction::TraceNode.new(Time.now, 'Custom/test/metric')
|
292
|
-
assert_equal(nil, s.find_node(-1))
|
293
|
-
end
|
294
|
-
|
295
|
-
def test_find_node_with_children
|
296
|
-
s = NewRelic::Agent::Transaction::TraceNode.new(Time.now, 'Custom/test/metric')
|
297
|
-
id_to_find = s.object_id
|
298
|
-
# should return itself in the base case
|
299
|
-
assert_equal(s, s.find_node(id_to_find))
|
300
|
-
end
|
301
|
-
|
302
283
|
def test_explain_sql_raising_an_error
|
303
284
|
s = NewRelic::Agent::Transaction::TraceNode.new(Time.now, 'Custom/test/metric')
|
304
285
|
config = { :adapter => 'mysql' }
|
@@ -81,8 +81,7 @@ class NewRelic::Agent::TransactionSamplerTest < Minitest::Test
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def test_on_start_transaction_disabled
|
84
|
-
with_config(:'transaction_tracer.enabled' => false
|
85
|
-
:developer_mode => false) do
|
84
|
+
with_config(:'transaction_tracer.enabled' => false) do
|
86
85
|
@sampler.expects(:start_builder).never
|
87
86
|
@sampler.on_start_transaction(@state, Time.at(100))
|
88
87
|
end
|
@@ -228,8 +227,7 @@ class NewRelic::Agent::TransactionSamplerTest < Minitest::Test
|
|
228
227
|
end
|
229
228
|
|
230
229
|
def test_harvest_when_disabled
|
231
|
-
with_config(:'transaction_tracer.enabled' => false
|
232
|
-
:developer_mode => false) do
|
230
|
+
with_config(:'transaction_tracer.enabled' => false) do
|
233
231
|
assert_equal([], @sampler.harvest!)
|
234
232
|
end
|
235
233
|
end
|
@@ -367,8 +365,7 @@ class NewRelic::Agent::TransactionSamplerTest < Minitest::Test
|
|
367
365
|
|
368
366
|
def test_start_builder_disabled
|
369
367
|
@state.transaction_sample_builder = 'not nil.'
|
370
|
-
with_config(:'transaction_tracer.enabled' => false
|
371
|
-
:developer_mode => false) do
|
368
|
+
with_config(:'transaction_tracer.enabled' => false) do
|
372
369
|
@sampler.send(:start_builder, @state)
|
373
370
|
assert_equal(nil, @state.transaction_sample_builder,
|
374
371
|
"should clear the transaction builder when disabled")
|
@@ -110,43 +110,4 @@ class NewRelic::CollectionHelperTest < Minitest::Test
|
|
110
110
|
def test_object
|
111
111
|
assert_equal ["foo", '#<OpenStruct>'], normalize_params(['foo', OpenStruct.new('z'=>'q')])
|
112
112
|
end
|
113
|
-
|
114
|
-
def test_strip_backtrace
|
115
|
-
clean_trace = strip_nr_from_backtrace(mock_backtrace)
|
116
|
-
assert_equal(0, clean_trace.grep(/newrelic_rpm/).size,
|
117
|
-
"should remove all instances of new relic from backtrace but got: #{clean_trace.join("\n")}")
|
118
|
-
assert_equal(0, clean_trace.grep(/trace/).size,
|
119
|
-
"should remove trace method tags from method names but got: #{clean_trace.join("\n")}")
|
120
|
-
assert((clean_trace.grep(/find/).size >= 3),
|
121
|
-
"should see at least three frames with 'find' in them: \n#{clean_trace.join("\n")}")
|
122
|
-
end
|
123
|
-
|
124
|
-
def test_disabled_strip_backtrace
|
125
|
-
with_config(:disable_backtrace_cleanup => true) do
|
126
|
-
clean_trace = strip_nr_from_backtrace(mock_backtrace)
|
127
|
-
assert_equal(1, clean_trace.grep(/new_relic/).size,
|
128
|
-
"should not remove instances of new relic from backtrace but got: #{clean_trace.join("\n")}")
|
129
|
-
assert_equal(1, clean_trace.grep(/_trace/).size,
|
130
|
-
"should not remove trace method tags from method names but got: #{clean_trace.join("\n")}")
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
private
|
135
|
-
def mock_backtrace
|
136
|
-
[
|
137
|
-
%q{/home/app/gems/activerecord-2.3.12/lib/active_record/base.rb:1620:in `find_one_without_trace'},
|
138
|
-
%q{/home/app/gems/activerecord-2.3.12/lib/active_record/base.rb:1620:in `find_one'},
|
139
|
-
%q{/home/app/gems/activerecord-2.3.12/lib/active_record/base.rb:1603:in `find_from_ids'},
|
140
|
-
%q{./test/new_relic/collection_helper_test.rb:112:in `test_strip_stackdump'},
|
141
|
-
%q{/home/app/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'},
|
142
|
-
%q{/home/app/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run'},
|
143
|
-
%q{/home/app/test/unit/testsuite.rb:34:in `run'},
|
144
|
-
%q{/home/app/test/unit/testsuite.rb:33:in `each'},
|
145
|
-
%q{/home/app/test/unit/testsuite.rb:33:in `run'},
|
146
|
-
%q{/home/app/test/unit/testsuite.rb:34:in `run'},
|
147
|
-
%q{/home/app/test/unit/testsuite.rb:33:in `each'},
|
148
|
-
%q{/home/app/test/unit/testsuite.rb:33:in `run'},
|
149
|
-
%q{/home/app/test/unit/ui/testrunnermediator.rb:46:in `run_suite'}
|
150
|
-
]
|
151
|
-
end
|
152
113
|
end
|
@@ -57,8 +57,7 @@ class NewRelic::ControlTest < Minitest::Test
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def test_transaction_tracer_disabled
|
60
|
-
with_config(:'transaction_tracer.enabled' => false,
|
61
|
-
:developer_mode => false, :monitor_mode => true) do
|
60
|
+
with_config(:'transaction_tracer.enabled' => false, :monitor_mode => true) do
|
62
61
|
assert(!NewRelic::Agent.instance.transaction_sampler.enabled?,
|
63
62
|
'transaction tracer enabled when config calls for disabled')
|
64
63
|
end
|
@@ -80,8 +79,7 @@ class NewRelic::ControlTest < Minitest::Test
|
|
80
79
|
|
81
80
|
def test_sql_tracer_disabled_when_tt_disabled
|
82
81
|
with_config(:'transaction_tracer.enabled' => false,
|
83
|
-
:'slow_sql.enabled' => true,
|
84
|
-
:developer_mode => false, :monitor_mode => true) do
|
82
|
+
:'slow_sql.enabled' => true, :monitor_mode => true) do
|
85
83
|
refute NewRelic::Agent.instance.sql_sampler.enabled?,
|
86
84
|
'sql enabled when transaction tracer disabled'
|
87
85
|
end
|
@@ -26,21 +26,11 @@ class LicenseTest < Minitest::Test
|
|
26
26
|
# unless listed here the expectation is that these terms will not occur in
|
27
27
|
# the source code.
|
28
28
|
EXPECTED_LICENSE_OCCURRENCES = {
|
29
|
-
['/
|
30
|
-
['/LICENSE', '
|
31
|
-
['/LICENSE', '(c)'] => 2,
|
32
|
-
['/LICENSE', 'Copyright'] => 4,
|
29
|
+
['/LICENSE', '(c)'] => 1,
|
30
|
+
['/LICENSE', 'Copyright'] => 1,
|
33
31
|
['/LICENSE', 'rights reserved'] => 1,
|
34
|
-
['/
|
35
|
-
['/
|
36
|
-
['/ui/views/newrelic/file/javascript/jquery-1.4.2.js', 'BSD'] => 2,
|
37
|
-
['/ui/views/newrelic/file/javascript/jquery-1.4.2.js', 'Copyright'] => 3,
|
38
|
-
['/ui/views/newrelic/file/javascript/jquery-1.4.2.js', 'MIT'] => 3,
|
39
|
-
['/test/new_relic/agent/agent_test_controller_test.rb', 'Apache'] => 1, # apache header tests
|
40
|
-
['/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb', 'Apache'] => 2, # parse apache solr metrics
|
41
|
-
['/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb', 'Apache'] => 1, # parse apache solr metrics
|
42
|
-
['/lib/new_relic/agent/system_info.rb', 'BSD'] => 4,
|
43
|
-
['/test/new_relic/agent/system_info_test.rb', 'BSD'] => 2
|
32
|
+
['/lib/new_relic/agent/system_info.rb', 'BSD'] => 4, # reference to BSD the operating system, not BSD the license
|
33
|
+
['/test/new_relic/agent/system_info_test.rb', 'BSD'] => 2 # reference to BSD the operating system, not BSD the license
|
44
34
|
}
|
45
35
|
|
46
36
|
def shebang
|
@@ -9,7 +9,6 @@ class ExternalSegment < Performance::TestCase
|
|
9
9
|
|
10
10
|
CONFIG = {
|
11
11
|
:license_key => 'a' * 40,
|
12
|
-
:developer_mode => false,
|
13
12
|
:'cross_application_tracer.enabled' => true,
|
14
13
|
:cross_process_id => "1#1884",
|
15
14
|
:encoding_key => "jotorotoes",
|
@@ -20,7 +19,6 @@ class ExternalSegment < Performance::TestCase
|
|
20
19
|
NewRelic::Agent.config.add_config_for_testing(CONFIG)
|
21
20
|
|
22
21
|
NewRelic::Agent.manual_start(
|
23
|
-
:developer_mode => false,
|
24
22
|
:monitor_mode => false
|
25
23
|
)
|
26
24
|
end
|
@@ -67,13 +67,11 @@ class RackMiddleware < Performance::TestCase
|
|
67
67
|
:encoding_key => 'lolz',
|
68
68
|
:application_id => '5, 6', # collector can return app multiple ids
|
69
69
|
:'rum.enabled' => true,
|
70
|
-
:license_key => 'a' * 40
|
71
|
-
:developer_mode => false
|
70
|
+
:license_key => 'a' * 40
|
72
71
|
}
|
73
72
|
NewRelic::Agent.config.add_config_for_testing(@config)
|
74
73
|
|
75
74
|
NewRelic::Agent.manual_start(
|
76
|
-
:developer_mode => false,
|
77
75
|
:monitor_mode => false
|
78
76
|
)
|
79
77
|
|
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: 4.
|
4
|
+
version: 4.1.0.333
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Krajcar
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|
@@ -166,7 +166,6 @@ files:
|
|
166
166
|
- config/database.yml
|
167
167
|
- init.rb
|
168
168
|
- install.rb
|
169
|
-
- lib/conditional_vendored_metric_parser.rb
|
170
169
|
- lib/new_relic/agent.rb
|
171
170
|
- lib/new_relic/agent/agent.rb
|
172
171
|
- lib/new_relic/agent/agent_logger.rb
|
@@ -278,7 +277,6 @@ files:
|
|
278
277
|
- lib/new_relic/agent/instrumentation/rake.rb
|
279
278
|
- lib/new_relic/agent/instrumentation/redis.rb
|
280
279
|
- lib/new_relic/agent/instrumentation/resque.rb
|
281
|
-
- lib/new_relic/agent/instrumentation/rubyprof.rb
|
282
280
|
- lib/new_relic/agent/instrumentation/sequel.rb
|
283
281
|
- lib/new_relic/agent/instrumentation/sequel_helper.rb
|
284
282
|
- lib/new_relic/agent/instrumentation/sidekiq.rb
|
@@ -319,7 +317,6 @@ files:
|
|
319
317
|
- lib/new_relic/agent/stats.rb
|
320
318
|
- lib/new_relic/agent/stats_engine.rb
|
321
319
|
- lib/new_relic/agent/stats_engine/gc_profiler.rb
|
322
|
-
- lib/new_relic/agent/stats_engine/metric_stats.rb
|
323
320
|
- lib/new_relic/agent/stats_engine/stats_hash.rb
|
324
321
|
- lib/new_relic/agent/supported_versions.rb
|
325
322
|
- lib/new_relic/agent/synthetics_event_aggregator.rb
|
@@ -335,7 +332,6 @@ files:
|
|
335
332
|
- lib/new_relic/agent/transaction/abstract_segment.rb
|
336
333
|
- lib/new_relic/agent/transaction/attributes.rb
|
337
334
|
- lib/new_relic/agent/transaction/datastore_segment.rb
|
338
|
-
- lib/new_relic/agent/transaction/developer_mode_sample_buffer.rb
|
339
335
|
- lib/new_relic/agent/transaction/external_request_segment.rb
|
340
336
|
- lib/new_relic/agent/transaction/request_attributes.rb
|
341
337
|
- lib/new_relic/agent/transaction/segment.rb
|
@@ -389,7 +385,6 @@ files:
|
|
389
385
|
- lib/new_relic/language_support.rb
|
390
386
|
- lib/new_relic/latest_changes.rb
|
391
387
|
- lib/new_relic/local_environment.rb
|
392
|
-
- lib/new_relic/merbtasks.rb
|
393
388
|
- lib/new_relic/metric_data.rb
|
394
389
|
- lib/new_relic/metric_spec.rb
|
395
390
|
- lib/new_relic/metrics.rb
|
@@ -398,8 +393,6 @@ files:
|
|
398
393
|
- lib/new_relic/rack/agent_hooks.rb
|
399
394
|
- lib/new_relic/rack/agent_middleware.rb
|
400
395
|
- lib/new_relic/rack/browser_monitoring.rb
|
401
|
-
- lib/new_relic/rack/developer_mode.rb
|
402
|
-
- lib/new_relic/rack/developer_mode/segment_summary.rb
|
403
396
|
- lib/new_relic/recipes.rb
|
404
397
|
- lib/new_relic/recipes/capistrano3.rb
|
405
398
|
- lib/new_relic/recipes/capistrano_legacy.rb
|
@@ -1051,7 +1044,6 @@ files:
|
|
1051
1044
|
- test/new_relic/agent/sized_buffer_test.rb
|
1052
1045
|
- test/new_relic/agent/sql_sampler_test.rb
|
1053
1046
|
- test/new_relic/agent/stats_engine/gc_profiler_test.rb
|
1054
|
-
- test/new_relic/agent/stats_engine/metric_stats_test.rb
|
1055
1047
|
- test/new_relic/agent/stats_engine/stats_hash_test.rb
|
1056
1048
|
- test/new_relic/agent/stats_engine_test.rb
|
1057
1049
|
- test/new_relic/agent/stats_test.rb
|
@@ -1069,7 +1061,6 @@ files:
|
|
1069
1061
|
- test/new_relic/agent/transaction/abstract_segment_test.rb
|
1070
1062
|
- test/new_relic/agent/transaction/attributes_test.rb
|
1071
1063
|
- test/new_relic/agent/transaction/datastore_segment_test.rb
|
1072
|
-
- test/new_relic/agent/transaction/developer_mode_sample_buffer_test.rb
|
1073
1064
|
- test/new_relic/agent/transaction/external_request_segment_test.rb
|
1074
1065
|
- test/new_relic/agent/transaction/request_attributes_test.rb
|
1075
1066
|
- test/new_relic/agent/transaction/segment_test.rb
|
@@ -1126,16 +1117,12 @@ files:
|
|
1126
1117
|
- test/new_relic/local_environment_test.rb
|
1127
1118
|
- test/new_relic/marshalling_test_cases.rb
|
1128
1119
|
- test/new_relic/metric_data_test.rb
|
1129
|
-
- test/new_relic/metric_parser/metric_parser_test.rb
|
1130
1120
|
- test/new_relic/metric_spec_test.rb
|
1131
1121
|
- test/new_relic/multiverse_helpers.rb
|
1132
1122
|
- test/new_relic/noticed_error_test.rb
|
1133
1123
|
- test/new_relic/rack/agent_hooks_test.rb
|
1134
1124
|
- test/new_relic/rack/agent_middleware_test.rb
|
1135
1125
|
- test/new_relic/rack/browser_monitoring_test.rb
|
1136
|
-
- test/new_relic/rack/developer_mode/segment_summary_test.rb
|
1137
|
-
- test/new_relic/rack/developer_mode_helper_test.rb
|
1138
|
-
- test/new_relic/rack/developer_mode_test.rb
|
1139
1126
|
- test/new_relic/transaction_ignoring_test_cases.rb
|
1140
1127
|
- test/nullverse/default_source_require_test.rb
|
1141
1128
|
- test/nullverse/nullverse_helper.rb
|
@@ -1190,88 +1177,9 @@ files:
|
|
1190
1177
|
- test/script/external_server.rb
|
1191
1178
|
- test/script/path_hash.rb
|
1192
1179
|
- test/test_helper.rb
|
1193
|
-
- ui/helpers/developer_mode_helper.rb
|
1194
|
-
- ui/helpers/google_pie_chart.rb
|
1195
|
-
- ui/views/layouts/newrelic_default.rhtml
|
1196
|
-
- ui/views/newrelic/_explain_plans.rhtml
|
1197
|
-
- ui/views/newrelic/_sample.rhtml
|
1198
|
-
- ui/views/newrelic/_segment.rhtml
|
1199
|
-
- ui/views/newrelic/_segment_limit_message.rhtml
|
1200
|
-
- ui/views/newrelic/_segment_row.rhtml
|
1201
|
-
- ui/views/newrelic/_show_sample_detail.rhtml
|
1202
|
-
- ui/views/newrelic/_show_sample_sql.rhtml
|
1203
|
-
- ui/views/newrelic/_show_sample_summary.rhtml
|
1204
|
-
- ui/views/newrelic/_sql_row.rhtml
|
1205
|
-
- ui/views/newrelic/_stack_trace.rhtml
|
1206
|
-
- ui/views/newrelic/_table.rhtml
|
1207
|
-
- ui/views/newrelic/explain_sql.rhtml
|
1208
|
-
- ui/views/newrelic/file/images/arrow-close.png
|
1209
|
-
- ui/views/newrelic/file/images/arrow-open.png
|
1210
|
-
- ui/views/newrelic/file/images/blue_bar.gif
|
1211
|
-
- ui/views/newrelic/file/images/file_icon.png
|
1212
|
-
- ui/views/newrelic/file/images/gray_bar.gif
|
1213
|
-
- ui/views/newrelic/file/images/new-relic-rpm-desktop.gif
|
1214
|
-
- ui/views/newrelic/file/images/new_relic_rpm_desktop.gif
|
1215
|
-
- ui/views/newrelic/file/images/textmate.png
|
1216
|
-
- ui/views/newrelic/file/javascript/jquery-1.4.2.js
|
1217
|
-
- ui/views/newrelic/file/javascript/transaction_sample.js
|
1218
|
-
- ui/views/newrelic/file/stylesheets/style.css
|
1219
|
-
- ui/views/newrelic/index.rhtml
|
1220
|
-
- ui/views/newrelic/sample_not_found.rhtml
|
1221
|
-
- ui/views/newrelic/show_sample.rhtml
|
1222
|
-
- ui/views/newrelic/threads.rhtml
|
1223
|
-
- vendor/gems/metric_parser-0.1.0.pre1/.specification
|
1224
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/metric_parser.rb
|
1225
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb
|
1226
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb
|
1227
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb
|
1228
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb
|
1229
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb
|
1230
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb
|
1231
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
|
1232
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb
|
1233
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
|
1234
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_ext.rb
|
1235
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
|
1236
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database_pool.rb
|
1237
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net.rb
|
1238
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net_parser.rb
|
1239
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb
|
1240
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb
|
1241
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/frontend.rb
|
1242
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/gc.rb
|
1243
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/hibernate_session.rb
|
1244
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb
|
1245
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java_parser.rb
|
1246
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp.rb
|
1247
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb
|
1248
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
|
1249
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb
|
1250
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
|
1251
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/nested.rb
|
1252
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb
|
1253
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
|
1254
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb
|
1255
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_context_listener.rb
|
1256
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_filter.rb
|
1257
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb
|
1258
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb
|
1259
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb
|
1260
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring.rb
|
1261
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_controller.rb
|
1262
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_view.rb
|
1263
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_action.rb
|
1264
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_result.rb
|
1265
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/version.rb
|
1266
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb
|
1267
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb
|
1268
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb
|
1269
|
-
- vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb
|
1270
1180
|
homepage: https://github.com/newrelic/rpm
|
1271
1181
|
licenses:
|
1272
1182
|
- New Relic
|
1273
|
-
- MIT
|
1274
|
-
- Ruby
|
1275
1183
|
metadata: {}
|
1276
1184
|
post_install_message:
|
1277
1185
|
rdoc_options: []
|
@@ -1,9 +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
|
-
unless defined?(NewRelic) && defined?(NewRelic::MetricParser)
|
6
|
-
vendored_metric_parser = File.expand_path('../../vendor/gems/metric_parser-0.1.0.pre1/lib/', __FILE__)
|
7
|
-
$:.unshift vendored_metric_parser unless $:.include?(vendored_metric_parser)
|
8
|
-
require 'metric_parser'
|
9
|
-
end
|
@@ -1,26 +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
|
-
DependencyDetection.defer do
|
6
|
-
named :rubyprof
|
7
|
-
|
8
|
-
depends_on do
|
9
|
-
defined?(::RubyProf) && defined?(::NewRelic::Rack::DeveloperMode) && ::NewRelic::Agent.config[:developer_mode]
|
10
|
-
end
|
11
|
-
|
12
|
-
executes do
|
13
|
-
NewRelic::Agent.instance.events.subscribe(:start_transaction) do
|
14
|
-
if NewRelic::Rack::DeveloperMode.profiling_enabled?
|
15
|
-
::RubyProf.start
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
NewRelic::Agent.instance.events.subscribe(:transaction_finished) do
|
20
|
-
if NewRelic::Rack::DeveloperMode.profiling_enabled?
|
21
|
-
trace = NewRelic::Agent::Transaction.tl_current.transaction_trace
|
22
|
-
trace.profile = ::RubyProf.stop
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|