metrics

Metrics infrastructure for OCaml
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library metrics
Module Metrics . Tags

Tags

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"; ]
type 'a v

The type for tag values.

type 'a t =
| [] : field list t
| :: : 'a v * 'b t -> ( 'a -> 'b ) t

The type tags: an heterogeneous list of names and types.

Tag Values

val v : 'a Fmt.t -> string -> 'a v

ty pp is a new typed tag.

val string : string -> string v
val float : string -> float v
val int : string -> int v
val uint : string -> int v
val int32 : string -> int32 v
val uint32 : string -> int32 v
val int64 : string -> int64 v
val uint64 : string -> int64 v
val bool : string -> bool v