anchor.diff:  register_stats() ->
       [(catch folsom_metrics:delete_metric(Stat)) || Stat <- folsom_metrics:get_metrics(),
                                                              is_tuple(Stat), element(1, Stat) == ?APP],
  -    [register_stat(stat_name(Name), Type) || {Name, Type} <- stats()],
  +    [do_register_stat(stat_name(Name), Type) || {Name, Type} <- stats()],
       riak_core_stat_cache:register_app(?APP, {?MODULE, produce_stats, []}).
   
   %% @spec get_stats() -> proplist()
  
positive.code:       {function, {function, ?MODULE, leveldb_read_block_errors}}}].
  
  %% @doc register a stat with folsom
  register_stat(Name, spiral) ->
      folsom_metrics:new_spiral(Name);
  register_stat(Name, counter) ->
      folsom_metrics:new_counter(Name);
  register_stat(Name, histogram) ->
      %% get the global default histo type
      {SampleType, SampleArgs} = get_sample_type(Name),
      folsom_metrics:new_histogram(Name, SampleType, SampleArgs);
  register_stat(Name, {function, F}) ->
      %% store the function in a gauge metric
      folsom_metrics:new_gauge(Name),
      folsom_metrics:notify({Name, F}).
  
negative.code:     register_stats(),
      {ok, ok}.
  
  handle_call({register, Name, Type}, _From, State) ->
      Rep = do_register_stat(Name, Type),
      {reply, Rep, State}.
  
  handle_cast({update, Arg}, State) ->
      do_update(Arg),
  