Module Opentelemetry_lwt.Metrics

include module type of struct include Opentelemetry.Metrics end

Metrics.

See the spec

type t
val float : ?start_time_unix_nano:int64 -> ?now:Opentelemetry.Timestamp_ns.t -> float -> Opentelemetry__Metrics_types.number_data_point

Number data point, as a float

val int : ?start_time_unix_nano:int64 -> ?now:Opentelemetry.Timestamp_ns.t -> int -> Opentelemetry__Metrics_types.number_data_point

Number data point, as an int

val gauge : name:string -> ?description:string -> ?unit_:string -> Opentelemetry__Metrics_types.number_data_point list -> t

Aggregation of a scalar metric, always with the current value

type aggregation_temporality =
| Aggregation_temporality_unspecified
| Aggregation_temporality_delta
| Aggregation_temporality_cumulative
val sum : name:string -> ?description:string -> ?unit_:string -> ?aggregation_temporality:Opentelemetry__Metrics_types.aggregation_temporality -> ?is_monotonic:bool -> Opentelemetry__Metrics_types.number_data_point list -> t

Sum of all reported measurements over a time interval

val emit : t list -> unit Lwt.t

Emit some metrics to the collector.