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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e880b2a64a110a0142d2181c5fd00e21bf9556fd5e5c7040392b4bcd10af94a7
4
- data.tar.gz: 738a4b0f51093ec199afdb7fafee94fce2401df4da9202403bc04f59707c626b
3
+ metadata.gz: b90db359ee9a4ce0043d52c3e1a391d6045e3aa292dff13964faee417c9c76e8
4
+ data.tar.gz: 87def45d9de621a59941831397f503e1c95922027fb07ef1c136d4b4dc186224
5
5
  SHA512:
6
- metadata.gz: f59e04082bbb62a3f99d63a13891d8adf9980c4c189a985928482fc4af2304786b03735da26e1683fcd2d2d78499719f3329d14bd5d2149f86e1f2f900c2df1e
7
- data.tar.gz: c95d5c11979da021f14d1923b851cde1f47f49c8fbc7d1e4d362280209939760ed254e02ef0d106d674181415eeec7a94940ec8053e781063c61e304a6a481ac
6
+ metadata.gz: 282d678c98d42998e7aef885e909cf9973eb9665c541fbeb24b5113d52b3ff312f5e12adcf808c17348dbe3fe4226aaee47f858f2c7c34588ddf323c7452998f
7
+ data.tar.gz: '00285b8f884e8e3fd11debaf64c82dc674dcdc7176274b796dcc552abd23501911fd3b67fb4c691cfc280fedbed499f06463e12d27f3fcb6e60ff38f4038e309'
data/.gitignore CHANGED
@@ -8,7 +8,6 @@ Guard*
8
8
  pkg/
9
9
  *.gem
10
10
  !rails
11
- Manifest*
12
11
  .idea/
13
12
  tmp/
14
13
  TAGS
@@ -37,3 +36,4 @@ yarn.lock
37
36
  errors.txt
38
37
  .history/
39
38
  vendor/
39
+ Brewfile.lock.json
data/Brewfile ADDED
@@ -0,0 +1,10 @@
1
+ brew 'imagemagick'
2
+ brew 'memcached'
3
+ tap 'mongodb/brew'
4
+ brew 'mongodb-community'
5
+ brew 'mysql'
6
+ brew 'openssl'
7
+ brew 'pkg-config'
8
+ brew 'postgresql'
9
+ brew 'rabbitmq'
10
+ brew 'redis'
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 an Github issue first.
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 or rvm to install any version of Ruby between 2.2 up to 3.1
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 environments"
35
- task :env, [:env1, :env2, :env3, :env4, :env5, :env6] => [] do |t, args|
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.map { |_, v| v }).run_and_report
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..6
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.times do |a|
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
@@ -13,7 +13,7 @@ DependencyDetection.defer do
13
13
  end
14
14
 
15
15
  executes do
16
- ::NewRelic::Agent.logger.info 'Installing ActiveStorage 5 instrumentation'
16
+ ::NewRelic::Agent.logger.info 'Installing ActiveStorage instrumentation'
17
17
  end
18
18
 
19
19
  executes do
@@ -9,10 +9,20 @@ module NewRelic
9
9
 
10
10
  ACTION_DISPATCH_PARAMETER_FILTER = "action_dispatch.parameter_filter".freeze
11
11
 
12
- RAILS_FILTER_CLASS = if defined?(ActiveSupport::ParameterFilter)
13
- ActiveSupport::ParameterFilter
14
- elsif defined?(ActionDispatch::Http::ParameterFilter)
15
- ActionDispatch::Http::ParameterFilter
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
@@ -10,7 +10,7 @@ module NewRelic
10
10
  end
11
11
 
12
12
  MAJOR = 8
13
- MINOR = 3
13
+ MINOR = 4
14
14
  TINY = 0
15
15
 
16
16
  begin
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.3.0
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-10 00:00:00.000000000 Z
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