lib/new_relic/agent/instrumentation/padrino/instrumentation.rb in newrelic_rpm-9.4.2 vs lib/new_relic/agent/instrumentation/padrino/instrumentation.rb in newrelic_rpm-9.5.0
- old
+ new
@@ -2,10 +2,14 @@
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true
module NewRelic::Agent::Instrumentation
module Padrino
+ INSTRUMENTATION_NAME = NewRelic::Agent.base_name(name)
+
def invoke_route_with_tracing(*args)
+ NewRelic::Agent.record_instrumentation_invocation(INSTRUMENTATION_NAME)
+
begin
env['newrelic.last_route'] = args[0].original_path
rescue => e
::NewRelic::Agent.logger.debug('Failed determining last route in Padrino', e)
end