Metrics.TagsTags indexes metric sources, and allow to enable/disable data collection at runtime.
Tags are heterogeneous lists of key names and type of values, which are associated to data sources. Filters on key names allow to select which data sources is enabled at runtime. Disabled data sources have a very low cost -- only allocating a closure.
For instance, to define the tags "PID", "IP" and "host", respectively of type int, Ipaddr.t:
let ipaddr = Tags.v Ipaddr.pp_hum in
let t = Tags.[ int "PID" ; ipaddr "IP" ; string "host"; ]The type tags: an heterogeneous list of names and types.
val string : string -> string vval float : string -> float vval int : string -> int vval uint : string -> int vval int32 : string -> int32 vval uint32 : string -> int32 vval int64 : string -> int64 vval uint64 : string -> int64 vval bool : string -> bool v