diff --git a/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb b/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb index a95f31dee7..71488ca9d0 100644 --- a/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +++ b/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb @@ -15,7 +15,8 @@ def render_in_with_tracing(*args) ) yield rescue => e - ::NewRelic::Agent.logger.debug('Error capturing ViewComponent segment', e) + NewRelic::Agent.notice_error(e) + raise ensure segment&.finish end