anchor.diff:    erlang:error({histogram_invalid_bound, Bound}).
   
   dobserve_impl(Registry, Name, LabelValues, Value) ->
  -  case ets:lookup(?TABLE, {Registry, Name, LabelValues}) of
  +  case ets:lookup(?TABLE, key(Registry, Name, LabelValues)) of
       [Metric] ->
         {BucketPosition, SumPosition} =
           calculate_histogram_update_positions(Metric, Value),
  -      ets:update_element(?TABLE, {Registry, Name, LabelValues},
  +      ets:update_element(?TABLE, key(Registry, Name, LabelValues),
                            {SumPosition, sum(Metric) + Value}),
  -      ets:update_counter(?TABLE, {Registry, Name, LabelValues},
  +      ets:update_counter(?TABLE, key(Registry, Name, LabelValues),
                            {BucketPosition, 1});
       [] ->
         insert_metric(Registry, Name, LabelValues, Value, fun dobserve_impl/4)
  
positive.code: %% mismatch.
  %% @end
  observe(Registry, Name, LabelValues, Value) when is_integer(Value) ->
    case ets:lookup(?TABLE, {Registry, Name, LabelValues}) of
      [Metric] ->
        {BucketPosition, SumPosition} =
          calculate_histogram_update_positions(Metric, Value),
        ets:update_counter(?TABLE, {Registry, Name, LabelValues},
                           [{BucketPosition, 1}, {SumPosition, Value}]);
      [] ->
        insert_metric(Registry, Name, LabelValues, Value, fun observe/4)
  
negative.code: sum(Metric) ->
    element(sum_position(Metric), Metric).
  
  reduce_sum(Metrics) ->
    lists:sum([element(sum_position(Metric), Metric) || Metric <- Metrics]).
  
  reduce_sum(MF, Metrics) ->
    DU = prometheus_metric:mf_duration_unit(MF),
    prometheus_time:maybe_convert_to_du(DU, reduce_sum(Metrics)).
  
  create_histogram_metric(Labels, DU, Buckets, LabelValues, Stat) ->
    Fun = fun(Bound) ->
              prometheus_time:maybe_convert_to_du(DU, Bound)
          end,
  