From 95b5a58033b452573ef298516905d9344c6e5447 Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Tue, 23 Jan 2024 13:37:27 -0800 Subject: [PATCH 1/4] Test that errors get raised, not swallowed --- .../view_component/view_component_instrumentation_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/multiverse/suites/view_component/view_component_instrumentation_test.rb b/test/multiverse/suites/view_component/view_component_instrumentation_test.rb index 9805313f03..9e8caed7e0 100644 --- a/test/multiverse/suites/view_component/view_component_instrumentation_test.rb +++ b/test/multiverse/suites/view_component/view_component_instrumentation_test.rb @@ -51,4 +51,10 @@ def test_metric_path_falsey def test_metric_path_unknown_file_pattern assert(FAKE_CLASS.metric_path('nothing_to_see_here'), 'unknown') end + + def test_error_raised + NewRelic::Agent::Tracer.stub(:start_segment, proc { |_args| raise 'kaboom' }) do + assert_equal(500, get('/view_components')) + end + end end From e11371c0a7b7cbecd1d57c57a730a61eb11dacd4 Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Wed, 24 Jan 2024 08:37:09 -0800 Subject: [PATCH 2/4] Merge dev, rubocop --- .../view_component/view_component_instrumentation_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/multiverse/suites/view_component/view_component_instrumentation_test.rb b/test/multiverse/suites/view_component/view_component_instrumentation_test.rb index 9e8caed7e0..b3cfbd908d 100644 --- a/test/multiverse/suites/view_component/view_component_instrumentation_test.rb +++ b/test/multiverse/suites/view_component/view_component_instrumentation_test.rb @@ -52,7 +52,7 @@ def test_metric_path_unknown_file_pattern assert(FAKE_CLASS.metric_path('nothing_to_see_here'), 'unknown') end - def test_error_raised + def test_error_raised NewRelic::Agent::Tracer.stub(:start_segment, proc { |_args| raise 'kaboom' }) do assert_equal(500, get('/view_components')) end From 9844992d0c31040ae045e79d3af313923e9a57a8 Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Wed, 24 Jan 2024 09:03:59 -0800 Subject: [PATCH 3/4] Add CHANGELOG entry --- CHANGELOG.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8e4110d2f..958e537969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,25 @@ # New Relic Ruby Agent Release Notes -## dev +## v9.7.1 -Version adds maximum size limits to custom event attributes. +Version 9.7.1 fixes a ViewComponent instrumentation bug and enforces maximum size limits for custom event attributes. + +- **Bugfix: Stop suppressing ViewComponent errors** + + Previously, the agent suppressed ViewComponent render errors. The agent now reports these errors and allows them to raise. Thank you @mjacobus for reporting this bug and providing a fix! [PR#2410](https://github.com/newrelic/newrelic-ruby-agent/pull/2410) - **Bugfix: Enforce maximum size limits for custom event attributes** Previously, the agent would allow custom event attributes to be any size. This would lead to the New Relic backend dropping attributes larger than the maximum size. Now, the agent will truncate custom event attribute values to 4095 characters, attribute names to 255 characters, and the total count of attributes to 64. [PR#2401](https://github.com/newrelic/newrelic-ruby-agent/pull/2401) - ## v9.7.0 - Version 9.7.0 introduces ViewComponent instrumentation, changes the endpoint used to access the cluster name for Elasticsearch instrumentation, removes the creation of the Ruby/Thread and Ruby/Fiber spans, and adds support for Falcon. - **Feature: ViewComponent instrumentation** - [ViewComponent](https://viewcomponent.org/) is a now an instrumented framework. The agent currently supports Roda versions 2.0.0+. [PR#2367](https://github.com/newrelic/newrelic-ruby-agent/pull/2367) + [ViewComponent](https://viewcomponent.org/) is a now an instrumented library. [PR#2367](https://github.com/newrelic/newrelic-ruby-agent/pull/2367) - **Feature: Use root path to access Elasticsearch cluster name** From d44da837c1476de8eeaf005976c7269e1d567dc6 Mon Sep 17 00:00:00 2001 From: Hannah Ramadan <76922290+hannahramadan@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:26:51 -0800 Subject: [PATCH 4/4] Update CHANGELOG.md Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 958e537969..47474c0701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Version 9.7.1 fixes a ViewComponent instrumentation bug and enforces maximum siz - **Bugfix: Stop suppressing ViewComponent errors** - Previously, the agent suppressed ViewComponent render errors. The agent now reports these errors and allows them to raise. Thank you @mjacobus for reporting this bug and providing a fix! [PR#2410](https://github.com/newrelic/newrelic-ruby-agent/pull/2410) + Previously, the agent suppressed ViewComponent render errors. The agent now reports these errors and allows them to raise. Thank you [@mjacobus](https://github.com/mjacobus) for reporting this bug and providing a fix! [PR#2410](https://github.com/newrelic/newrelic-ruby-agent/pull/2410) - **Bugfix: Enforce maximum size limits for custom event attributes**