@@ -49,6 +49,10 @@ rewrite(_Config) ->
49
49
<<" 00-10000000000000000000000000000000-1000000000000000-00" >>}],
50
50
otel_propagator_trace_context :inject (Ctx , [],
51
51
fun otel_propagator_text_map :default_carrier_set /3 , [])),
52
+ ? assertMatch ([{<<" traceparent" >>,
53
+ <<" 00-10000000000000000000000000000000-1000000000000000-00" >>}],
54
+ otel_propagator_trace_context :inject (Ctx , [],
55
+ fun otel_propagator_text_map :default_carrier_set /3 , [])),
52
56
53
57
? assertMatch ([{<<" traceparent" >>,
54
58
<<" 00-10000000000000000000000000000000-1000000000000000-00" >>}],
@@ -67,6 +71,12 @@ rewrite(_Config) ->
67
71
? assertEqual (RecordingSpanCtx # span_ctx {is_recording = false ,
68
72
is_remote = true }, otel_tracer :current_span_ctx ()),
69
73
74
+ % should not fail on empty Carrier
75
+ ? assertMatch (Ctx ,
76
+ otel_propagator_trace_context :extract (Ctx , [],
77
+ fun otel_propagator_text_map :default_carrier_keys /1 ,
78
+ fun otel_propagator_text_map :default_carrier_get /2 , [])),
79
+
70
80
ok .
71
81
72
82
invalid_span_no_sdk_propagation (_Config ) ->
0 commit comments