Skip to content

Commit

Permalink
unit test and CHANGELOG entry for 2870
Browse files Browse the repository at this point in the history
unit test branch coverage and a CHANGELOG bugfix writeup to accompany PR
2870
  • Loading branch information
fallwith committed Sep 30, 2024
1 parent 3063ea8 commit 72d32e9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Version 9.14.0 adds Apache Kafka instrumentation for the rdkafka and ruby-kafka

To address a recent Bundler deprecation warning, we started using `Bundler.rubygems.installed_specs` instead of `Bundler.rubygems.all_specs` in environments that seemed appropriate. We discovered the version constraint we used was too low. Now, rather than check the version, we check for the method using `respond_to?`. [PR#2853](https://github.com/newrelic/newrelic-ruby-agent/pull/2853)

- **Bugfix: Support view_component v3.15.0+**

Previously the agent had been making use of a private API to obtain a component identifier value. This private API was dropped in v3.15.0 of view_component, resulting in errors from the New Relic Ruby agent's continued attempts to use it. Many thanks to community member [@navidemad](https://github.com/navidemad) for bringing this issue to our attention and supplying a bugfix with [PR#2870](https://github.com/newrelic/newrelic-ruby-agent/pull/2870).

## v9.13.0

Version 9.13.0 enhances support for AWS Lambda functions, adds experimental OpenSearch instrumentation, updates framework detection, silences a Bundler deprecation warning, fixes Falcon dispatcher detection, fixes a bug with Redis instrumentation installation, and addresses a JRuby-specific concurrency issue.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,15 @@ def test_error_raised
assert_equal(500, get('/view_components'))
end
end

# Test metric name being built when the controller class doesn't respond to :identifier
# https://github.com/newrelic/newrelic-ruby-agent/pull/2870
def test_the_metric_name_omits_the_identifier_when_absent
in_transaction do |txn|
FAKE_CLASS.render_in_with_tracing { 11 * 38 }
actual_name = txn.segments.last.name

assert_equal 'View/component/DummyViewComponentInstrumentationClass', actual_name
end
end
end

0 comments on commit 72d32e9

Please sign in to comment.