Opentelemetry.Metrics_callbacks
A set of callbacks that produce metrics when called. The metrics are automatically called regularly.
This allows applications to register metrics callbacks from various points in the program (or even in libraries), and not worry about setting alarms/intervals to emit them.
val register : (unit -> Metrics.t list) -> unit
register f
adds the callback f
to the list.
f
will be called at unspecified times and is expected to return a list of metrics. It might be called regularly by the backend, in particular (but not only) when Collector.tick
is called.