Skip to content

Commit

Permalink
Merge pull request #2174 from newrelic/dev
Browse files Browse the repository at this point in the history
Release 9.4.2
  • Loading branch information
tannalynn authored Aug 18, 2023
2 parents b2fd83c + 3f67277 commit ec96144
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# New Relic Ruby Agent Release Notes

## v9.4.2

Version 9.4.2 of the agent re-addresses the 9.4.0 issue of `NoMethodError` seen when using the `uppy-s3_multipart` gem.

- **Bugfix: Resolve NoMethodError**

Ruby agent 9.4.1 attempted to fix a `NoMethodError` introduced in 9.4.0. A missing `require` prevented a method from scoping appropriately and has now been added. Thanks to [@spickermann](https://github.com/spickermann) and [@ColinOrr](https://github.com/ColinOrr) for working with us to get this resolved. [PR#2167](https://github.com/newrelic/newrelic-ruby-agent/pull/2167)

## v9.4.1

Version 9.4.1 of the agent resolves a `NoMethodError` introduced in 9.4.0.
Expand Down
1 change: 1 addition & 0 deletions lib/new_relic/agent/instrumentation/roda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# frozen_string_literal: true

require_relative 'roda/instrumentation'
require_relative 'roda/roda_transaction_namer'

DependencyDetection.defer do
named :roda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module TransactionNamer
extend self

ROOT = '/'.freeze
REGEX_MULTIPLE_SLASHES = %r{^[/^\A]*(.*?)[/$?\z]*$}.freeze
REGEX_MULTIPLE_SLASHES = %r{^[/^]*(.*?)[/$?]*$}.freeze

def transaction_name(request)
path = request.path || ::NewRelic::Agent::UNKNOWN_METRIC
Expand Down
2 changes: 1 addition & 1 deletion lib/new_relic/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module NewRelic
module VERSION # :nodoc:
MAJOR = 9
MINOR = 4
TINY = 1
TINY = 2

STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def test_noticed_error_only_at_segment_when_violating_unique_constraints
end

def test_noticed_error_only_at_segment_when_command_fails
skip if ENV['CI']
expected_error_class = /Mongo\:\:Error/
txn = nil
in_transaction do |db_txn|
Expand Down
7 changes: 7 additions & 0 deletions test/multiverse/suites/roda/roda_instrumentation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ def test_roda_instrumentation_works_if_middleware_disabled
end
end

def test_roda_namer_removes_rogue_slashes
get('/home//')
txn = harvest_transaction_events![1][0]

assert_equal 'Controller/Roda/RodaTestApp/GET home', txn[0]['name']
end

def test_transaction_name_error
NewRelic::Agent.stub(:logger, NewRelic::Agent::MemoryLogger.new) do
# pass in {} to produce an error, because {} doesn't support #path and
Expand Down

0 comments on commit ec96144

Please sign in to comment.