From 52616768658657daf862c741ff8f2d31441c4563 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Fri, 24 Feb 2023 21:41:50 -0600 Subject: [PATCH] squash: fix bad refactoring --- .../instrumentation/rack/middlewares/event_handler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb index 972f0df48..fb1053bb6 100644 --- a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb +++ b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb @@ -142,9 +142,9 @@ def on_finish(request, response) EMPTY_HASH = {}.freeze def extract_request_headers(env) - return EMPTY_HASH if @allowed_request_headers.empty? + return EMPTY_HASH if allowed_request_headers.empty? - @allowed_request_headers.each_with_object({}) do |(key, value), result| + allowed_request_headers.each_with_object({}) do |(key, value), result| result[value] = env[key] if env.key?(key) end end