newrelic_rpm 3.6.8.164 → 3.6.8.168
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +15 -0
- data/lib/new_relic/agent/agent.rb +1 -10
- data/lib/new_relic/agent/new_relic_service.rb +1 -1
- data/lib/new_relic/build.rb +2 -2
- data/lib/new_relic/transaction_sample.rb +1 -0
- data/test/multiverse/suites/rails/request_statistics_test.rb +27 -0
- data/test/new_relic/agent/agent/start_worker_thread_test.rb +0 -7
- data/test/new_relic/agent/agent_test.rb +9 -7
- data/test/new_relic/transaction_sample_test.rb +6 -0
- data.tar.gz.sig +0 -0
- metadata +11 -4
- metadata.gz.sig +0 -0
data/CHANGELOG
CHANGED
@@ -14,6 +14,21 @@
|
|
14
14
|
that platform. With the bug fixed, the agent can gather those metrics again.
|
15
15
|
Thanks Bram de Vries for the contribution!
|
16
16
|
|
17
|
+
* Missing Resque transaction traces (3.6.8.168)
|
18
|
+
|
19
|
+
A bug in 3.6.8.164 prevented transaction traces in Resque jobs from being
|
20
|
+
communicated back to New Relic. 3.6.8.168 fixes this.
|
21
|
+
|
22
|
+
* Retry on initial connect (3.6.8.168)
|
23
|
+
|
24
|
+
Failure to contact New Relic on agent start-up would not properly retry. This
|
25
|
+
has been fixed.
|
26
|
+
|
27
|
+
* Fix potential memory leak on failure to send to New Relic (3.6.8.168)
|
28
|
+
|
29
|
+
3.6.8.164 introduced a potential memory leak when transmission of some kinds
|
30
|
+
of data to New Relic servers failed. 3.6.8.168 fixes this.
|
31
|
+
|
17
32
|
## v3.6.7 ##
|
18
33
|
|
19
34
|
* Resque-pool support
|
@@ -602,13 +602,6 @@ module NewRelic
|
|
602
602
|
disconnect
|
603
603
|
end
|
604
604
|
|
605
|
-
# there is a problem with connecting to the server, so we
|
606
|
-
# stop trying to connect and shut down the agent
|
607
|
-
def handle_server_connection_problem(error)
|
608
|
-
::NewRelic::Agent.logger.error "Unable to establish connection with the server.", error
|
609
|
-
disconnect
|
610
|
-
end
|
611
|
-
|
612
605
|
# Handles an unknown error in the worker thread by logging
|
613
606
|
# it and disconnecting the agent, since we are now in an
|
614
607
|
# unknown state.
|
@@ -630,8 +623,6 @@ module NewRelic
|
|
630
623
|
retry
|
631
624
|
rescue NewRelic::Agent::ForceDisconnectException => e
|
632
625
|
handle_force_disconnect(e)
|
633
|
-
rescue NewRelic::Agent::ServerConnectionException => e
|
634
|
-
handle_server_connection_problem(e)
|
635
626
|
rescue => e
|
636
627
|
handle_other_error(e)
|
637
628
|
end
|
@@ -913,7 +904,7 @@ module NewRelic
|
|
913
904
|
handle_license_error(e)
|
914
905
|
rescue NewRelic::Agent::UnrecoverableAgentException => e
|
915
906
|
handle_unrecoverable_agent_error(e)
|
916
|
-
rescue Timeout::Error => e
|
907
|
+
rescue Timeout::Error, NewRelic::Agent::ServerConnectionException => e
|
917
908
|
log_error(e)
|
918
909
|
if opts[:keep_retrying]
|
919
910
|
note_connect_failure
|
data/lib/new_relic/build.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
# GITSHA:
|
2
|
-
module NewRelic; module VERSION; BUILD='
|
1
|
+
# GITSHA: 7a5180e239c03f1d4e3692394a6032c819ccf663
|
2
|
+
module NewRelic; module VERSION; BUILD='168'; end; end
|
@@ -190,6 +190,7 @@ module NewRelic
|
|
190
190
|
sample.params.merge! self.params
|
191
191
|
sample.guid = self.guid
|
192
192
|
sample.force_persist = self.force_persist if self.force_persist
|
193
|
+
sample.threshold = self.threshold
|
193
194
|
sample.xray_session_id = self.xray_session_id
|
194
195
|
|
195
196
|
build_segment_for_transfer(sample, @root_segment, sample.root_segment, options)
|
@@ -62,6 +62,33 @@ class RequestStatsTest < ActionController::TestCase
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
def test_request_samples_should_be_preserved_upon_failure
|
66
|
+
with_config(:'analytics_events.enabled' => true) do
|
67
|
+
5.times { get :stats_action }
|
68
|
+
|
69
|
+
# fail once
|
70
|
+
$collector.stub('analytic_event_data', {}, 503)
|
71
|
+
assert_raises(NewRelic::Agent::ServerConnectionException) do
|
72
|
+
NewRelic::Agent.agent.send(:harvest_and_send_analytic_event_data)
|
73
|
+
end
|
74
|
+
|
75
|
+
# recover
|
76
|
+
$collector.stub('analytic_event_data', {'return_value'=>nil}, 200)
|
77
|
+
NewRelic::Agent.agent.send(:harvest_and_send_analytic_event_data)
|
78
|
+
|
79
|
+
post = $collector.calls_for('analytic_event_data').last
|
80
|
+
|
81
|
+
samples = post.body
|
82
|
+
assert_equal(5, samples.size)
|
83
|
+
samples.each do |sample|
|
84
|
+
# undo the extra layer of wrapping that the collector wants
|
85
|
+
sample = sample.first
|
86
|
+
assert_kind_of Hash, sample
|
87
|
+
assert_kind_of Float, sample['duration']
|
88
|
+
assert_kind_of Float, sample['timestamp']
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
65
92
|
|
66
93
|
|
67
94
|
#
|
@@ -54,13 +54,6 @@ class NewRelic::Agent::Agent::StartWorkerThreadTest < Test::Unit::TestCase
|
|
54
54
|
handle_force_disconnect(error)
|
55
55
|
end
|
56
56
|
|
57
|
-
def test_handle_server_connection_problem
|
58
|
-
error = StandardError.new('a message')
|
59
|
-
|
60
|
-
self.expects(:disconnect)
|
61
|
-
handle_server_connection_problem(error)
|
62
|
-
end
|
63
|
-
|
64
57
|
def test_handle_other_error
|
65
58
|
error = StandardError.new('a message')
|
66
59
|
|
@@ -242,13 +242,15 @@ module NewRelic
|
|
242
242
|
|
243
243
|
def test_connect_retries_on_timeout
|
244
244
|
service = @agent.service
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
245
|
+
service.stubs(:connect).raises(Timeout::Error).then.returns(nil)
|
246
|
+
@agent.stubs(:connect_retry_period).returns(0)
|
247
|
+
@agent.send(:connect)
|
248
|
+
assert(@agent.connected?)
|
249
|
+
end
|
250
|
+
|
251
|
+
def test_connect_retries_on_server_connection_exception
|
252
|
+
service = @agent.service
|
253
|
+
service.stubs(:connect).raises(ServerConnectionException).then.returns(nil)
|
252
254
|
@agent.stubs(:connect_retry_period).returns(0)
|
253
255
|
@agent.send(:connect)
|
254
256
|
assert(@agent.connected?)
|
@@ -184,6 +184,12 @@ class NewRelic::TransactionSampleTest < Test::Unit::TestCase
|
|
184
184
|
assert_equal(123, s.xray_session_id)
|
185
185
|
end
|
186
186
|
|
187
|
+
def test_threshold
|
188
|
+
@t.threshold = 4.2
|
189
|
+
s = @t.prepare_to_send
|
190
|
+
assert_equal(4.2, s.threshold)
|
191
|
+
end
|
192
|
+
|
187
193
|
|
188
194
|
def test_count_segments
|
189
195
|
transaction = run_sample_trace_on(NewRelic::Agent::TransactionSampler.new) do |sampler|
|
data.tar.gz.sig
CHANGED
Binary file
|
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.6.8.
|
4
|
+
version: 3.6.8.168
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -40,7 +40,7 @@ cert_chain:
|
|
40
40
|
cHUySWFQWE92bTNUOEc0TzZxWnZobkxoL1VpZW4rK0RqOGVGQmVjVFBvTThw
|
41
41
|
VmpLM3BoNQpuL0V3dVpDY0U2Z2h0Q0NNCi0tLS0tRU5EIENFUlRJRklDQVRF
|
42
42
|
LS0tLS0K
|
43
|
-
date: 2013-10-
|
43
|
+
date: 2013-10-19 00:00:00.000000000 Z
|
44
44
|
dependencies:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: rake
|
@@ -930,8 +930,15 @@ post_install_message: ! "# New Relic Ruby Agent Release Notes #\n\n## v3.6.8 ##\
|
|
930
930
|
sessions\n documentation at https://newrelic.com/docs/site/xray-sessions.\n\n*
|
931
931
|
CPU metrics re-enabled for JRuby >= 1.7.0\n\n To work around a JRuby bug, the Ruby
|
932
932
|
agent stopped gathering CPU metrics on\n that platform. With the bug fixed, the
|
933
|
-
agent can gather those metrics again.\n Thanks Bram de Vries for the contribution!\n\
|
934
|
-
|
933
|
+
agent can gather those metrics again.\n Thanks Bram de Vries for the contribution!\n\n*
|
934
|
+
Missing Resque transaction traces (3.6.8.168)\n\n A bug in 3.6.8.164 prevented
|
935
|
+
transaction traces in Resque jobs from being\n communicated back to New Relic.
|
936
|
+
3.6.8.168 fixes this.\n\n* Retry on initial connect (3.6.8.168)\n\n Failure to
|
937
|
+
contact New Relic on agent start-up would not properly retry. This\n has been fixed.\n\n*
|
938
|
+
Fix potential memory leak on failure to send to New Relic (3.6.8.168)\n\n 3.6.8.164
|
939
|
+
introduced a potential memory leak when transmission of some kinds\n of data to
|
940
|
+
New Relic servers failed. 3.6.8.168 fixes this.\n\nSee https://github.com/newrelic/rpm/blob/master/CHANGELOG
|
941
|
+
for a full list of\nchanges.\n"
|
935
942
|
rdoc_options:
|
936
943
|
- --line-numbers
|
937
944
|
- --inline-source
|
metadata.gz.sig
CHANGED
Binary file
|