newrelic_rpm 8.3.0 → 8.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Brewfile +10 -0
- data/CHANGELOG.md +19 -0
- data/CONTRIBUTING.md +2 -2
- data/Rakefile +3 -3
- data/lib/new_relic/agent/configuration/default_source.rb +1 -3
- data/lib/new_relic/agent/guid_generator.rb +2 -7
- data/lib/new_relic/agent/instrumentation/active_storage.rb +1 -1
- data/lib/new_relic/agent/parameter_filtering.rb +14 -4
- data/lib/new_relic/control/frameworks/sinatra.rb +6 -0
- data/lib/new_relic/version.rb +1 -1
- data/newrelic_rpm.gemspec +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b90db359ee9a4ce0043d52c3e1a391d6045e3aa292dff13964faee417c9c76e8
|
4
|
+
data.tar.gz: 87def45d9de621a59941831397f503e1c95922027fb07ef1c136d4b4dc186224
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 282d678c98d42998e7aef885e909cf9973eb9665c541fbeb24b5113d52b3ff312f5e12adcf808c17348dbe3fe4226aaee47f858f2c7c34588ddf323c7452998f
|
7
|
+
data.tar.gz: '00285b8f884e8e3fd11debaf64c82dc674dcdc7176274b796dcc552abd23501911fd3b67fb4c691cfc280fedbed499f06463e12d27f3fcb6e60ff38f4038e309'
|
data/.gitignore
CHANGED
data/Brewfile
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# New Relic Ruby Agent Release Notes #
|
2
2
|
|
3
|
+
## v8.4.0
|
4
|
+
|
5
|
+
* **Provide basic support for Rails 7.0**
|
6
|
+
|
7
|
+
This release includes Rails 7.0 as a tested Rails version. Updates build upon the agent's current Rails instrumentation and do not include additional instrumentation for new features.
|
8
|
+
|
9
|
+
* **Improve the performance of NewRelic::Agent::GuidGenerator#generate_guid**
|
10
|
+
|
11
|
+
This method is called by many basic operations within the agent including transactions, datastore segments, and external request segments. Thank you, @jdelstrother for contributing this performance improvement!
|
12
|
+
|
13
|
+
* **Documentation: Development environment prep instructions**
|
14
|
+
|
15
|
+
The multiverse collection of test suites requires a variety of data handling software (MySQL, Redis, memcached, etc.) to be available on the machine running the tests. The [project documentation](test/multiverse/README.md) has been updated to outline the relevant software packages, and a `Brewfile` file has been added to automate software installation with Homebrew.
|
16
|
+
|
17
|
+
* **Bugfix: Add ControllerInstrumentation::Shims to Sinatra framework**
|
18
|
+
|
19
|
+
When the agent is disabled by setting the configuration settings `enabled`, `agent_enabled`, and/or `monitor_mode` to false, the agent loads shims for public controller instrumentation methods. These shims were missing for the Sinatra framework, causing applications to crash if the agent was disabled. Thank you, @NC-piercej for bringing this to our attention!
|
20
|
+
|
21
|
+
|
3
22
|
## v8.3.0
|
4
23
|
|
5
24
|
* **Updated the agent to support Ruby 3.1.0**
|
data/CONTRIBUTING.md
CHANGED
@@ -31,7 +31,7 @@ incorrect.
|
|
31
31
|
|
32
32
|
If you are planning on contributing a new feature or an otherwise complex
|
33
33
|
contribution, we kindly ask you to start a conversation with the maintainer team
|
34
|
-
by opening up
|
34
|
+
by opening up a GitHub issue first.
|
35
35
|
|
36
36
|
|
37
37
|
### General Guidelines
|
@@ -94,7 +94,7 @@ includes unreleased work. Please create all new branches off of `dev`.
|
|
94
94
|
- Fork the repository inside GitHub
|
95
95
|
- `git clone git@github.com:<gh username>/newrelic-ruby-agent.git`
|
96
96
|
1. Pick a Ruby version
|
97
|
-
- Use rbenv
|
97
|
+
- Use rbenv, rvm, chruby, asdf, etc. to install any version of Ruby between 2.2 up to the latest stable version
|
98
98
|
1. Install development dependencies
|
99
99
|
- `bundle install`
|
100
100
|
1. Check that your env is setup correctly
|
data/Rakefile
CHANGED
@@ -31,10 +31,10 @@ namespace :test do
|
|
31
31
|
Performance::Runner.new(options).run_and_report
|
32
32
|
end
|
33
33
|
|
34
|
-
desc "Run agent within existing mini
|
35
|
-
task :env
|
34
|
+
desc "Run agent within existing mini environment(s): env[name1,name2,name3,etc.]"
|
35
|
+
task :env do |t, args|
|
36
36
|
require File.expand_path(File.join(File.dirname(__FILE__), 'test', 'environments', 'lib', 'environments', 'runner'))
|
37
|
-
Environments::Runner.new(args.
|
37
|
+
Environments::Runner.new(args.to_a).run_and_report
|
38
38
|
end
|
39
39
|
|
40
40
|
Rake::TestTask.new(:intentional_fail) do |t|
|
@@ -123,11 +123,9 @@ module NewRelic
|
|
123
123
|
when defined?(::NewRelic::TEST) then :test
|
124
124
|
when defined?(::Rails::VERSION)
|
125
125
|
case Rails::VERSION::MAJOR
|
126
|
-
when 0..2
|
127
|
-
:rails
|
128
126
|
when 3
|
129
127
|
:rails3
|
130
|
-
when 4..
|
128
|
+
when 4..7
|
131
129
|
:rails_notifications
|
132
130
|
else
|
133
131
|
::NewRelic::Agent.logger.warn "Detected untested Rails version #{Rails::VERSION::STRING}"
|
@@ -5,8 +5,6 @@
|
|
5
5
|
module NewRelic
|
6
6
|
module Agent
|
7
7
|
module GuidGenerator
|
8
|
-
HEX_DIGITS = (0..15).map { |i| i.to_s(16) }
|
9
|
-
|
10
8
|
module_function
|
11
9
|
|
12
10
|
# This method intentionally does not use SecureRandom, because it relies
|
@@ -15,11 +13,8 @@ module NewRelic
|
|
15
13
|
# The guids generated by this method may not be _secure_, but they are
|
16
14
|
# random enough for our purposes.
|
17
15
|
def generate_guid length = 16
|
18
|
-
guid =
|
19
|
-
length.
|
20
|
-
guid << HEX_DIGITS[rand(16)]
|
21
|
-
end
|
22
|
-
guid
|
16
|
+
guid = rand(16**length).to_s(16)
|
17
|
+
guid.length < length ? guid.rjust(length, "0") : guid
|
23
18
|
end
|
24
19
|
end
|
25
20
|
end
|
@@ -9,10 +9,20 @@ module NewRelic
|
|
9
9
|
|
10
10
|
ACTION_DISPATCH_PARAMETER_FILTER = "action_dispatch.parameter_filter".freeze
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
if defined?(Rails) && Gem::Version.new(::Rails::VERSION::STRING) >= Gem::Version.new('5.0.0')
|
13
|
+
Rails.application.config.to_prepare do
|
14
|
+
RAILS_FILTER_CLASS = if defined?(ActiveSupport::ParameterFilter)
|
15
|
+
ActiveSupport::ParameterFilter
|
16
|
+
elsif defined?(ActionDispatch::Http::ParameterFilter)
|
17
|
+
ActionDispatch::Http::ParameterFilter
|
18
|
+
end
|
19
|
+
end
|
20
|
+
else
|
21
|
+
RAILS_FILTER_CLASS = if defined?(ActiveSupport::ParameterFilter)
|
22
|
+
ActiveSupport::ParameterFilter
|
23
|
+
elsif defined?(ActionDispatch::Http::ParameterFilter)
|
24
|
+
ActionDispatch::Http::ParameterFilter
|
25
|
+
end
|
16
26
|
end
|
17
27
|
|
18
28
|
def apply_filters(env, params)
|
@@ -8,6 +8,12 @@ module NewRelic
|
|
8
8
|
module Frameworks
|
9
9
|
# Contains basic control logic for Sinatra
|
10
10
|
class Sinatra < NewRelic::Control::Frameworks::Ruby
|
11
|
+
protected
|
12
|
+
|
13
|
+
def install_shim
|
14
|
+
super
|
15
|
+
::Sinatra::Base.class_eval { include NewRelic::Agent::Instrumentation::ControllerInstrumentation::Shim }
|
16
|
+
end
|
11
17
|
end
|
12
18
|
end
|
13
19
|
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.2.0'
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
13
|
-
s.authors = ["Tanna McClure", "Kayla Reopelle"]
|
13
|
+
s.authors = ["Tanna McClure", "Kayla Reopelle", "James Bunch"]
|
14
14
|
s.licenses = ['Apache-2.0']
|
15
15
|
s.description = <<-EOS
|
16
16
|
New Relic is a performance management system, developed by New Relic,
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanna McClure
|
8
8
|
- Kayla Reopelle
|
9
|
+
- James Bunch
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2022-01-
|
13
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: rake
|
@@ -232,6 +233,7 @@ files:
|
|
232
233
|
- ".project"
|
233
234
|
- ".rubocop.yml"
|
234
235
|
- ".yardopts"
|
236
|
+
- Brewfile
|
235
237
|
- CHANGELOG.md
|
236
238
|
- CONTRIBUTING.md
|
237
239
|
- Gemfile
|