anchor.diff:           code_change/3]).
   
   -record(state, {
  +    key,
       type,
       rrd
   }).
  
positive.code: %%% Internal functions
  %%%===================================================================
  
  module_for(gauge) -> yasa_metrics_gauge;
  module_for(counter) -> yasa_metrics_counter.
  
negative.code: 
  init([Type, Key]) ->
      case yasa_rrd:load(Key) of
          {ok, {Type, RRD}} ->
              {ok, #state{rrd = RRD, type = Type}};
          {ok, _} ->
              {stop, type_mismatch};
          {error, not_found} ->
              Retentions = retentions_for_key(Key),
              {ok, #state{rrd = yasa_rrd:new(Retentions), type = Type}}
      end.
  
  handle_call({Type, Points}, _From, #state{rrd = RRD0} = State0) ->
  