newrelic_rpm 6.1.0.352 → 6.2.0.354
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +23 -97
- data/CHANGELOG.md +16 -0
- data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +1 -1
- data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +0 -1
- data/lib/new_relic/agent/transaction_time_aggregator.rb +19 -4
- data/lib/new_relic/version.rb +1 -1
- data/newrelic_rpm.gemspec +2 -9
- metadata +9 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61ee707dd3738565b01b05857ed9ae7de00a6ab3e9cc0522ba5d651819c24634
|
4
|
+
data.tar.gz: e8b630ad8f1c69a51dae797a046f90bd8d87683dcc4a2fb97f2960dcf6f90b4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ee286b42523ceca71287a9463a6e6a66e825f27956fd460c72aacb640780a20db0e5c688951f2d0a4bb648a4d8bd5dad98220d1f5a98e9abcc51843bd71aa1e
|
7
|
+
data.tar.gz: 1a5070f668fd0b4f802ee71fe3909c123d0b38a53a1491ec07a496177cf9f392015c95ae62284b086a4fd27952fa0e62a7d720813de09449f5b4b8b8c4331a5e
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -10,15 +10,16 @@ sudo: required
|
|
10
10
|
|
11
11
|
before_install:
|
12
12
|
# RUBY-2072 Prevent Travis setup failure before our test even starts
|
13
|
+
- jdk_switcher use oraclejdk8
|
13
14
|
- sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3.list
|
14
15
|
- gem --version
|
15
16
|
- ./test/script/before_install/update_rubygems.sh
|
16
|
-
- gem uninstall bundler
|
17
|
+
- rvm @global do gem uninstall bundler --all --executables || true
|
17
18
|
- gem install bundler -v=1.17.3
|
18
19
|
- ./test/script/before_install/gemstash_mirror.sh
|
19
|
-
- bundle
|
20
|
+
- bundle --version
|
20
21
|
|
21
|
-
install: bundle
|
22
|
+
install: bundle install
|
22
23
|
|
23
24
|
addons:
|
24
25
|
apt:
|
@@ -46,9 +47,9 @@ notifications:
|
|
46
47
|
|
47
48
|
rvm:
|
48
49
|
# Run slowest builds first to try and optimize overall cycle time.
|
49
|
-
- jruby-9.
|
50
|
-
- 2.6.
|
51
|
-
- 2.5.
|
50
|
+
- jruby-9.2.6.0
|
51
|
+
- 2.6.1
|
52
|
+
- 2.5.3
|
52
53
|
- 2.4.2
|
53
54
|
- 2.3.5
|
54
55
|
- 2.2.8
|
@@ -66,11 +67,6 @@ env:
|
|
66
67
|
- TESTOPTS="-v"
|
67
68
|
- VERBOSE = 1
|
68
69
|
matrix:
|
69
|
-
# RUBY-1668 rails21, rails22, and rails23 are all excluded below
|
70
|
-
- TYPE=UNIT ENVIRONMENT=rails21
|
71
|
-
- TYPE=UNIT ENVIRONMENT=rails22
|
72
|
-
- TYPE=UNIT ENVIRONMENT=rails23
|
73
|
-
|
74
70
|
- TYPE=UNIT ENVIRONMENT=rails30
|
75
71
|
- TYPE=UNIT ENVIRONMENT=rails31
|
76
72
|
- TYPE=UNIT ENVIRONMENT=rails32
|
@@ -97,48 +93,30 @@ matrix:
|
|
97
93
|
exclude:
|
98
94
|
# Unsupported Rails/Ruby combinations
|
99
95
|
# 2.6
|
100
|
-
- rvm: 2.6.
|
101
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
102
|
-
- rvm: 2.6.0
|
103
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
104
|
-
- rvm: 2.6.0
|
105
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
106
|
-
- rvm: 2.6.0
|
96
|
+
- rvm: 2.6.1
|
107
97
|
env: TYPE=UNIT ENVIRONMENT=rails30
|
108
|
-
- rvm: 2.6.
|
98
|
+
- rvm: 2.6.1
|
109
99
|
env: TYPE=UNIT ENVIRONMENT=rails31
|
110
|
-
- rvm: 2.6.
|
100
|
+
- rvm: 2.6.1
|
111
101
|
env: TYPE=UNIT ENVIRONMENT=rails32
|
112
|
-
- rvm: 2.6.
|
102
|
+
- rvm: 2.6.1
|
113
103
|
env: TYPE=UNIT ENVIRONMENT=rails40
|
114
|
-
- rvm: 2.6.
|
104
|
+
- rvm: 2.6.1
|
115
105
|
env: TYPE=UNIT ENVIRONMENT=rails41
|
116
106
|
|
117
107
|
# 2.5
|
118
|
-
- rvm: 2.5.
|
119
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
120
|
-
- rvm: 2.5.0
|
121
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
122
|
-
- rvm: 2.5.0
|
123
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
124
|
-
- rvm: 2.5.0
|
108
|
+
- rvm: 2.5.3
|
125
109
|
env: TYPE=UNIT ENVIRONMENT=rails30
|
126
|
-
- rvm: 2.5.
|
110
|
+
- rvm: 2.5.3
|
127
111
|
env: TYPE=UNIT ENVIRONMENT=rails31
|
128
|
-
- rvm: 2.5.
|
112
|
+
- rvm: 2.5.3
|
129
113
|
env: TYPE=UNIT ENVIRONMENT=rails32
|
130
|
-
- rvm: 2.5.
|
114
|
+
- rvm: 2.5.3
|
131
115
|
env: TYPE=UNIT ENVIRONMENT=rails40
|
132
|
-
- rvm: 2.5.
|
116
|
+
- rvm: 2.5.3
|
133
117
|
env: TYPE=UNIT ENVIRONMENT=rails41
|
134
118
|
|
135
119
|
# 2.4
|
136
|
-
- rvm: 2.4.2
|
137
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
138
|
-
- rvm: 2.4.2
|
139
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
140
|
-
- rvm: 2.4.2
|
141
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
142
120
|
- rvm: 2.4.2
|
143
121
|
env: TYPE=UNIT ENVIRONMENT=rails30
|
144
122
|
- rvm: 2.4.2
|
@@ -150,78 +128,26 @@ matrix:
|
|
150
128
|
- rvm: 2.4.2
|
151
129
|
env: TYPE=UNIT ENVIRONMENT=rails41
|
152
130
|
|
153
|
-
# 2.3
|
154
|
-
- rvm: 2.3.5
|
155
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
156
|
-
- rvm: 2.3.5
|
157
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
158
|
-
- rvm: 2.3.5
|
159
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
160
|
-
|
161
|
-
# 2.2
|
162
|
-
- rvm: 2.2.8
|
163
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
164
|
-
- rvm: 2.2.8
|
165
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
166
|
-
- rvm: 2.2.8
|
167
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
168
|
-
|
169
131
|
# 2.1
|
170
|
-
- rvm: 2.1.10
|
171
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
172
|
-
- rvm: 2.1.10
|
173
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
174
|
-
- rvm: 2.1.10
|
175
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
176
132
|
- rvm: 2.1.10
|
177
133
|
env: TYPE=UNIT ENVIRONMENT=rails50
|
178
134
|
- rvm: 2.1.10
|
179
135
|
env: TYPE=UNIT ENVIRONMENT=rails51
|
180
136
|
|
181
137
|
# 2.0
|
182
|
-
- rvm: 2.0.0-p648
|
183
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
184
|
-
- rvm: 2.0.0-p648
|
185
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
186
|
-
- rvm: 2.0.0-p648
|
187
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
188
138
|
- rvm: 2.0.0-p648
|
189
139
|
env: TYPE=UNIT ENVIRONMENT=rails50
|
190
140
|
- rvm: 2.0.0-p648
|
191
141
|
env: TYPE=UNIT ENVIRONMENT=rails51
|
192
142
|
|
193
|
-
# jruby 9.0
|
194
|
-
- rvm: jruby-9.
|
195
|
-
env: TYPE=UNIT ENVIRONMENT=rails21
|
196
|
-
- rvm: jruby-9.1.13.0
|
197
|
-
env: TYPE=UNIT ENVIRONMENT=rails22
|
198
|
-
- rvm: jruby-9.1.13.0
|
199
|
-
env: TYPE=UNIT ENVIRONMENT=rails23
|
200
|
-
- rvm: jruby-9.1.13.0
|
143
|
+
# jruby 9.2.6.0 (Compatible with MRI 2.5)
|
144
|
+
- rvm: jruby-9.2.6.0
|
201
145
|
env: TYPE=UNIT ENVIRONMENT=rails30
|
202
|
-
- rvm: jruby-9.
|
146
|
+
- rvm: jruby-9.2.6.0
|
203
147
|
env: TYPE=UNIT ENVIRONMENT=rails31
|
204
|
-
- rvm: jruby-9.
|
148
|
+
- rvm: jruby-9.2.6.0
|
205
149
|
env: TYPE=UNIT ENVIRONMENT=rails32
|
206
|
-
|
207
|
-
# Travis (and only Travis) has been throwing difficult-to-reproduce
|
208
|
-
# errors in various JRuby tests. These appeared after a build image
|
209
|
-
# update, and they seem to be unrelated to any agent code changes.
|
210
|
-
# So, we'll allow these specific test runs to fail while we track
|
211
|
-
# the issue (RUBY-1869).
|
212
|
-
#
|
213
|
-
allow_failures:
|
214
|
-
- rvm: jruby-9.1.13.0
|
150
|
+
- rvm: jruby-9.2.6.0
|
215
151
|
env: TYPE=UNIT ENVIRONMENT=rails40
|
216
|
-
- rvm: jruby-9.
|
152
|
+
- rvm: jruby-9.2.6.0
|
217
153
|
env: TYPE=UNIT ENVIRONMENT=rails41
|
218
|
-
- rvm: jruby-9.1.13.0
|
219
|
-
env: TYPE=UNIT ENVIRONMENT=rails42
|
220
|
-
- rvm: jruby-9.1.13.0
|
221
|
-
env: TYPE=UNIT ENVIRONMENT=rails50
|
222
|
-
- rvm: jruby-9.1.13.0
|
223
|
-
env: TYPE=UNIT ENVIRONMENT=rails51
|
224
|
-
- rvm: jruby-9.1.13.0
|
225
|
-
env: TYPE=UNIT ENVIRONMENT=norails
|
226
|
-
- rvm: jruby-9.1.13.0
|
227
|
-
env: TYPE=FUNCTIONAL GROUP=background_2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# New Relic Ruby Agent Release Notes #
|
2
2
|
|
3
|
+
## v6.2.0
|
4
|
+
|
5
|
+
* Bugfix for superfluous `Empty JSON response` error messages
|
6
|
+
|
7
|
+
Version 6.1.0 of the agent frequently logged error messages about an empty
|
8
|
+
JSON response, when no error had occurred. These logs no longer appear.
|
9
|
+
|
10
|
+
* Bugfix for `Unable to calculate elapsed transaction time` warning messages
|
11
|
+
|
12
|
+
Ruby Agent versions 5.4 through 6.1, when running in jruby without
|
13
|
+
ObjectSpace enabled, would occasionally log a warning indicating that the
|
14
|
+
agent was unable to calculate the elapsed transaction time. When this log
|
15
|
+
statement appeared, the affected transactions would not be included in the
|
16
|
+
data displayed on the capacity analysis page. These transactions are now
|
17
|
+
correctly recorded.
|
18
|
+
|
3
19
|
## v6.1.0
|
4
20
|
|
5
21
|
* Performance monitoring on Kubernetes
|
@@ -31,7 +31,7 @@ module NewRelic
|
|
31
31
|
# we don't expect this to be called more than once, but we're being
|
32
32
|
# defensive.
|
33
33
|
return if defined?(cached?)
|
34
|
-
if ::ActiveRecord::VERSION::STRING >= "5.1.0"
|
34
|
+
if defined?(::ActiveRecord) && ::ActiveRecord::VERSION::STRING >= "5.1.0"
|
35
35
|
def cached?(payload)
|
36
36
|
payload.fetch(:cached, false)
|
37
37
|
end
|
@@ -2,8 +2,6 @@
|
|
2
2
|
# This file is distributed under New Relic's license terms.
|
3
3
|
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
4
|
|
5
|
-
require 'objspace'
|
6
|
-
|
7
5
|
# This module powers the Busy calculation for the Capacity report in
|
8
6
|
# APM (https://rpm.newrelic.com/accounts/.../applications/.../optimize/capacity_analysis).
|
9
7
|
#
|
@@ -102,12 +100,27 @@ module NewRelic
|
|
102
100
|
end
|
103
101
|
|
104
102
|
def thread_is_alive?(thread_id)
|
105
|
-
thread =
|
103
|
+
thread = thread_by_id thread_id
|
106
104
|
thread && thread.alive?
|
107
105
|
rescue StandardError
|
108
106
|
false
|
109
107
|
end
|
110
108
|
|
109
|
+
# ObjectSpace is faster on MRI, but disabled by default on JRuby for
|
110
|
+
# perfomance reasons. We have two implmentations of `thread_by_id`
|
111
|
+
# based on ruby implementation.
|
112
|
+
if RUBY_ENGINE == 'jruby'
|
113
|
+
def thread_by_id thread_id
|
114
|
+
Thread.list.detect { |t| t.object_id == thread_id }
|
115
|
+
end
|
116
|
+
else
|
117
|
+
require 'objspace'
|
118
|
+
|
119
|
+
def thread_by_id thread_id
|
120
|
+
ObjectSpace._id2ref(thread_id)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
111
124
|
def set_transaction_start_time(timestamp, thread_id = current_thread)
|
112
125
|
@stats[thread_id].transaction_started_at = timestamp
|
113
126
|
end
|
@@ -131,7 +144,9 @@ module NewRelic
|
|
131
144
|
end
|
132
145
|
|
133
146
|
def log_missing_elapsed_transaction_time
|
134
|
-
transaction_name = Tracer.current_transaction
|
147
|
+
transaction_name = Tracer.current_transaction &&
|
148
|
+
Tracer.current_transaction.best_name ||
|
149
|
+
"unknown"
|
135
150
|
NewRelic::Agent.logger.warn("Unable to calculate elapsed transaction time for #{transaction_name}")
|
136
151
|
end
|
137
152
|
end
|
data/lib/new_relic/version.rb
CHANGED
data/newrelic_rpm.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.version = NewRelic::VERSION::STRING
|
11
11
|
s.required_ruby_version = '>= 2.0.0'
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
13
|
-
s.authors = [ "Matthew Wear", "Chris Pine", "
|
13
|
+
s.authors = [ "Matthew Wear", "Chris Pine", "Rachel Klein", "Justin Foote" ]
|
14
14
|
s.date = Time.now.strftime('%Y-%m-%d')
|
15
15
|
s.licenses = ['New Relic']
|
16
16
|
s.description = <<-EOS
|
@@ -45,15 +45,8 @@ EOS
|
|
45
45
|
s.add_development_dependency 'minitest', '~> 4.7.5'
|
46
46
|
s.add_development_dependency 'mocha', '~> 0.13.0'
|
47
47
|
s.add_development_dependency 'yard'
|
48
|
-
s.add_development_dependency 'rails', '~> 3.2.13'
|
49
|
-
s.add_development_dependency 'json', '>= 2.0.2' if RUBY_VERSION >= '2.4.0' # possible bundler issue?
|
50
48
|
s.add_development_dependency 'pry-nav', '~> 0.2.4'
|
51
49
|
s.add_development_dependency 'pry-stack_explorer', '~> 0.4.9'
|
52
50
|
s.add_development_dependency 'hometown', '~> 0.2.5'
|
53
|
-
|
54
|
-
if RUBY_PLATFORM == 'java'
|
55
|
-
s.add_development_dependency 'activerecord-jdbcsqlite3-adapter'
|
56
|
-
else
|
57
|
-
s.add_development_dependency 'sqlite3', '~> 1.3.13'
|
58
|
-
end
|
51
|
+
s.add_development_dependency 'bundler', '< 2.0'
|
59
52
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.2.0.354
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Wear
|
8
8
|
- Chris Pine
|
9
|
-
- Erin Dees
|
10
9
|
- Rachel Klein
|
10
|
+
- Justin Foote
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-
|
14
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|
@@ -69,34 +69,6 @@ dependencies:
|
|
69
69
|
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
|
-
- !ruby/object:Gem::Dependency
|
73
|
-
name: rails
|
74
|
-
requirement: !ruby/object:Gem::Requirement
|
75
|
-
requirements:
|
76
|
-
- - "~>"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 3.2.13
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
requirements:
|
83
|
-
- - "~>"
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 3.2.13
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
name: json
|
88
|
-
requirement: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 2.0.2
|
93
|
-
type: :development
|
94
|
-
prerelease: false
|
95
|
-
version_requirements: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: 2.0.2
|
100
72
|
- !ruby/object:Gem::Dependency
|
101
73
|
name: pry-nav
|
102
74
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,19 +112,19 @@ dependencies:
|
|
140
112
|
- !ruby/object:Gem::Version
|
141
113
|
version: 0.2.5
|
142
114
|
- !ruby/object:Gem::Dependency
|
143
|
-
name:
|
115
|
+
name: bundler
|
144
116
|
requirement: !ruby/object:Gem::Requirement
|
145
117
|
requirements:
|
146
|
-
- - "
|
118
|
+
- - "<"
|
147
119
|
- !ruby/object:Gem::Version
|
148
|
-
version:
|
120
|
+
version: '2.0'
|
149
121
|
type: :development
|
150
122
|
prerelease: false
|
151
123
|
version_requirements: !ruby/object:Gem::Requirement
|
152
124
|
requirements:
|
153
|
-
- - "
|
125
|
+
- - "<"
|
154
126
|
- !ruby/object:Gem::Version
|
155
|
-
version:
|
127
|
+
version: '2.0'
|
156
128
|
description: |
|
157
129
|
New Relic is a performance management system, developed by New Relic,
|
158
130
|
Inc (http://www.newrelic.com). New Relic provides you with deep
|
@@ -489,8 +461,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
489
461
|
- !ruby/object:Gem::Version
|
490
462
|
version: 1.3.1
|
491
463
|
requirements: []
|
492
|
-
|
493
|
-
rubygems_version: 2.7.7
|
464
|
+
rubygems_version: 3.0.3
|
494
465
|
signing_key:
|
495
466
|
specification_version: 4
|
496
467
|
summary: New Relic Ruby Agent
|