package metrics

  1. Overview
  2. Docs

Module Metrics.TagsSource

Tags indexes metric sources, and allow to enable/disable data collection at runtime.

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

The type for tag values.

Sourcetype 'a t =
  1. | [] : field list t
  2. | :: : 'a v * 'b t -> ('a -> 'b) t

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

Tag Values

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

ty pp is a new typed tag.

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