lib/opentelemetry/instrumentation/rack/instrumentation.rb in opentelemetry-instrumentation-rack-0.24.2 vs lib/opentelemetry/instrumentation/rack/instrumentation.rb in opentelemetry-instrumentation-rack-0.24.5
- old
+ new
@@ -53,10 +53,10 @@
require_relative 'middlewares/event_handler' if defined?(::Rack::Events)
require_relative 'middlewares/tracer_middleware'
end
def config_options(user_config)
- config = super(user_config)
+ config = super
config[:allowed_rack_request_headers] = config[:allowed_request_headers].compact.each_with_object({}) do |header, memo|
key = header.to_s.upcase.gsub(/[-\s]/, '_')
case key
when 'CONTENT_TYPE', 'CONTENT_LENGTH'
memo[key] = build_attribute_name('http.request.header.', header)