From 76ef411d582907045777c4114f6a2575d28c5ca9 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 23 Jun 2021 16:22:02 -0500 Subject: [PATCH] fix: return early if carrier is nil (#835) --- api/lib/opentelemetry/baggage/propagation/text_map_propagator.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/api/lib/opentelemetry/baggage/propagation/text_map_propagator.rb b/api/lib/opentelemetry/baggage/propagation/text_map_propagator.rb index c2c66aa47..ad28275f1 100644 --- a/api/lib/opentelemetry/baggage/propagation/text_map_propagator.rb +++ b/api/lib/opentelemetry/baggage/propagation/text_map_propagator.rb @@ -52,6 +52,7 @@ def inject(carrier, context: Context.current, setter: Context::Propagation.text_ # if extraction fails def extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter) header = getter.get(carrier, BAGGAGE_KEY) + return context unless header entries = header.gsub(/\s/, '').split(',')