lib/opentelemetry/instrumentation/grape/event_handler.rb in opentelemetry-instrumentation-grape-0.1.6 vs lib/opentelemetry/instrumentation/grape/event_handler.rb in opentelemetry-instrumentation-grape-0.1.7

- old
+ new

@@ -91,11 +91,11 @@ def path(endpoint) return '' unless endpoint.routes namespace = endpoint.routes.first.namespace - version = endpoint.routes.first.options[:version] || '' - prefix = endpoint.routes.first.options[:prefix]&.to_s || '' + version = endpoint.routes.first.options[:version]&.to_s + prefix = endpoint.routes.first.options[:prefix]&.to_s parts = [prefix, version] + namespace.split('/') + endpoint.options[:path] parts.reject { |p| p.nil? || p.empty? || p.eql?('/') }.join('/').prepend('/') end def formatter_type(formatter)