This commit is contained in:
Hannes Mehnert 2019-11-06 20:58:52 +01:00
parent 2969493479
commit b3b9894a61

View file

@ -9,9 +9,11 @@ module Make (T : Mirage_time.S) (S : Mirage_stack.V4) = struct
let timer conn get host stack dst = let timer conn get host stack dst =
let datas = let datas =
Metrics.SM.fold (fun src (tags, data) acc -> Metrics.SM.fold (fun src things acc ->
let name = Metrics.Src.name src in let name = Metrics.Src.name src in
Metrics_influx.encode_line_protocol (host@tags) data name :: acc) List.map (fun (tags, data) ->
Metrics_influx.encode_line_protocol (host@tags) data name)
things @ acc)
(get ()) [] (get ()) []
in in
let datas = String.concat "" datas in let datas = String.concat "" datas in