anchor.diff:  set(Key, Value, _Metadata) when (is_list(Key) orelse is_binary(Key)) andalso not is_binary(Value) ->
       ok;
   set(Ctx, Key, Value) ->
  -    set(Ctx, Key, Value, []).
  +    set_to(?assert_type(Ctx, otel_ctx:t()),
  +           ?assert_type(Key, input_key()),
  +           ?assert_type(Value, input_value()),
  +           []).
   
  --spec set(otel_ctx:t(), key() | unicode:charlist(), value(), metadata()) -> otel_ctx:t().
  +-spec set_to(otel_ctx:t(), input_key(), input_value()) -> otel_ctx:t().
  +set_to(Ctx, Key, Value) ->
  +    set_to(Ctx, Key, Value, []).
  +
  +-spec set(otel_ctx:t(), input_key(), input_value(), metadata()) -> otel_ctx:t().
   set(Ctx, Key, Value, Metadata) when is_binary(Value) ->
       Baggage = otel_ctx:get_value(Ctx, ?BAGGAGE_KEY, #{}),
       otel_ctx:set_value(Ctx, ?BAGGAGE_KEY, maps:merge(Baggage, verify_baggage(#{Key => {Value, Metadata}})));
   %% drop bad value
   set(Ctx, _, _, _) ->
  +    Ctx.
  +
  +-spec set_to(otel_ctx:t(), input_key(), input_value(), metadata()) -> otel_ctx:t().
  +set_to(Ctx, Key, Value, Metadata) when is_binary(Value) ->
  +    Baggage = otel_ctx:get_value(Ctx, ?BAGGAGE_KEY, #{}),
  +    otel_ctx:set_value(Ctx, ?BAGGAGE_KEY, maps:merge(Baggage, verify_baggage(#{Key => {Value, Metadata}})));
  +%% drop bad value
  +set_to(Ctx, _, _, _) ->
       Ctx.
   
   -spec get_all() -> t().
  
positive.code: %% keys and values are UTF-8 binaries
  -type key() :: unicode:unicode_binary().
  -type value() :: unicode:unicode_binary().
  -type metadata() :: [unicode:unicode_binary() | {unicode:unicode_binary(), unicode:unicode_binary()}].
  
  -type t() :: #{key() => {value(), metadata()}}.
  
negative.code:               value/0]).
  
  -define(BAGGAGE_KEY, '$__otel_baggage_ctx_key').
  
  -include_lib("gradualizer/include/gradualizer.hrl").
  
  -spec set(#{key() => value()} | [{key(), value()}]) -> ok.
  set(KeyValues) when is_list(KeyValues) ->
  