lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb in opentelemetry-instrumentation-rack-0.24.0 vs lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb in opentelemetry-instrumentation-rack-0.24.1
- old
+ new
@@ -190,10 +190,10 @@
attributes.merge!(extract_request_headers(env))
attributes
end
def detach_contexts(request)
- request.env[TOKENS_KEY]&.reverse&.each do |token|
+ request.env[TOKENS_KEY]&.reverse_each do |token|
OpenTelemetry::Context.detach(token)
OpenTelemetry::Trace.current_span.finish
end
rescue StandardError => e
OpenTelemetry.handle_error(exception: e)