anchor.diff:      AggTags = [[hostname], [hostname, backend]],
       telemetry:counter(mm_connect_successes, Tags, AggTags, 1).
   
  -update_p99(Conns, {netlink,tcp_metrics,_, _, _, {get,_,_,Attrs}}) ->
  +get_p99s(Conns, Metrics) ->
  +    lists:flatmap(fun (M) -> get_p99_updates(Conns, M) end, Metrics).
  +
  +get_p99_updates(Conns, {netlink,tcp_metrics,_, _, _, {get,_,_,Attrs}}) ->
       match_metrics(Conns, proplists:get_value(d_addr, Attrs), proplists:get_value(vals, Attrs)).
   
  -match_metrics(_, undefined, _) -> ok;
  -match_metrics(_, _, undefined) -> ok;
  +match_metrics(_, undefined, _) -> [];
  +match_metrics(_, _, undefined) -> [];
   match_metrics(Conns, Addr, Vals) -> match_conn(maps:get(Addr, Conns, undefined),
                                                  proplists:get_value(rtt_us, Vals), 
                                                  proplists:get_value(rtt_var_us, Vals)).
  -match_conn(undefined, _, _) -> ok;
  -match_conn(_, undefined, _) -> ok;
  -match_conn(_, _, undefined) -> ok;
  -match_conn(#ip_vs_conn{dst_ip = IP, dst_port = Port,
  -                       to_ip = VIP, to_port = VIPPort},
  -             RttUs, RttVarUs) ->
  +match_conn(undefined, _, _) -> [];
  +match_conn(_, undefined, _) -> [];
  +match_conn(_, _, undefined) -> [];
  +match_conn(Conns, RttUs, RttVarUs) -> [{Conns, RttUs, RttVarUs}].
  +
  +apply_p99({Conns, RttUs, RttVarUs}) ->
  +    lists:foreach(fun(C) -> apply_p99(C, RttUs, RttVarUs) end, Conns).
  +
  +apply_p99(#ip_vs_conn{dst_ip = IP, dst_port = Port,
  +                      to_ip = VIP, to_port = VIPPort},
  +          RttUs, RttVarUs) ->
       P99 = erlang:round(1000*(RttUs + math:sqrt(RttVarUs)*3)),
       Tags = named_tags(IP, Port, VIP, VIPPort),
       AggTags = [[hostname], [hostname, backend]],
       telemetry:histogram(mm_connect_latency, Tags, AggTags, P99).
  +
   
   -spec(named_tags(IIP :: integer(),
                    Port :: inet:port_numbrer(),
  
positive.code:     New = new_connections(#{Conn => ConnStatus0}, #{Conn => ConnStatus1}),
      [?_assertEqual(#{Conn => ConnStatus1}, New)].
  
  -endif.
  
negative.code: new_conn_test_() ->
      Conn = <<"foobar">>,
      ConnStatus = #ip_vs_conn_status{conn_state = <<"conn_state">>, tcp_state = established},
      New = new_connections(#{}, #{Conn => ConnStatus}),
      New1 = new_connections(#{Conn => ConnStatus}, #{Conn => ConnStatus}),
      [?_assertEqual(#{Conn => ConnStatus}, New),
       ?_assertEqual(#{}, New1)].
  