diff --git a/apps/opentelemetry/test/opentelemetry_SUITE.erl b/apps/opentelemetry/test/opentelemetry_SUITE.erl index b2a7c2c39..c02abafdc 100644 --- a/apps/opentelemetry/test/opentelemetry_SUITE.erl +++ b/apps/opentelemetry/test/opentelemetry_SUITE.erl @@ -218,7 +218,7 @@ propagation(Config) -> otel_baggage:set(<<"key-1">>, <<"value=1">>, []), %% TODO: should the whole baggage entry be dropped if metadata is bad? %% drop bad metadata (the `1'). - otel_baggage:set(<<"key-2">>, <<"value-2">>, [<<"metadata">>, 1]), + otel_baggage:set(<<"key-2">>, <<"value-2">>, [<<"metadata">>, 1, {<<"md-k-1">>, <<"md-v-1">>}]), %% drop baggage with bad value otel_baggage:set(<<"key-3">>, value3), @@ -227,14 +227,14 @@ propagation(Config) -> EncodedTraceId = io_lib:format("~32.16.0b", [TraceId]), EncodedSpanId = io_lib:format("~16.16.0b", [SpanId]), - ?assertListsEqual([{<<"baggage">>, <<"key-2=value-2;metadata,key-1=value%3D1">>}, + ?assertListsEqual([{<<"baggage">>, <<"key-2=value-2;metadata;md-k-1=md-v-1,key-1=value%3D1">>}, {<<"existing-header">>, <<"I exist">>} | trace_context(Propagator, EncodedTraceId, EncodedSpanId)], Headers), ?end_span(SpanCtx), ?assertEqual(#{<<"key-1">> => {<<"value=1">>, []}, - <<"key-2">> => {<<"value-2">>, [<<"metadata">>]}}, otel_baggage:get_all()), + <<"key-2">> => {<<"value-2">>, [<<"metadata">>, {<<"md-k-1">>, <<"md-v-1">>}]}}, otel_baggage:get_all()), %% ?end_span doesn't remove the span from the context ?assertEqual(SpanCtx, ?current_span_ctx), @@ -250,7 +250,7 @@ propagation(Config) -> otel_propagator:text_map_extract(BinaryHeaders), ?assertEqual(#{<<"key-1">> => {<<"value=1">>, []}, - <<"key-2">> => {<<"value-2">>, [<<"metadata">>]}}, otel_baggage:get_all()), + <<"key-2">> => {<<"value-2">>, [<<"metadata">>, {<<"md-k-1">>, <<"md-v-1">>}]}}, otel_baggage:get_all()), %% extracted remote spans are set to the active span %% but with `is_recording' false