Library
Module
Module type
Parameter
Class
Class type
Data
defines what is stored in the time series.
Metric
's data points are a list of typed fields with an optional timestamp. They are created with the v
and field constructors.
For instance, to create a data point with two values "%CPU"
and "MEM"
, respectively of type float
and int
:
let x = Data.v [ float "%CPU" 0.42; int "MEM" 27_000 ]
The type for timestamp. A timestamp shows the date and time, in RFC3339 UTC, associated with particular data.
timestamp t
is t
's timestamp (if any). If it is None
, then the reporter will add a new timestamp automatically.
v ?timestamp f
is the measure f
, as a the list metric name and value, and the timestamp timestamp
. If timestamp
is not provided, it will be set be the reporter. Raise Invalid_argument
is a key or a value contains an invalid character.