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