mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -04:00
fix: regenerate code with a non-pinned ocaml-protoc
This commit is contained in:
parent
9c096411a2
commit
794527ebbd
19 changed files with 1090 additions and 1099 deletions
|
|
@ -1,5 +1,13 @@
|
||||||
[@@@ocaml.warning "-27-30-39"]
|
[@@@ocaml.warning "-27-30-39"]
|
||||||
|
|
||||||
|
type array_value_mutable = {
|
||||||
|
mutable values : Common_types.any_value list;
|
||||||
|
}
|
||||||
|
|
||||||
|
let default_array_value_mutable () : array_value_mutable = {
|
||||||
|
values = [];
|
||||||
|
}
|
||||||
|
|
||||||
type key_value_list_mutable = {
|
type key_value_list_mutable = {
|
||||||
mutable values : Common_types.key_value list;
|
mutable values : Common_types.key_value list;
|
||||||
}
|
}
|
||||||
|
|
@ -18,14 +26,6 @@ let default_key_value_mutable () : key_value_mutable = {
|
||||||
value = None;
|
value = None;
|
||||||
}
|
}
|
||||||
|
|
||||||
type array_value_mutable = {
|
|
||||||
mutable values : Common_types.any_value list;
|
|
||||||
}
|
|
||||||
|
|
||||||
let default_array_value_mutable () : array_value_mutable = {
|
|
||||||
values = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
type instrumentation_scope_mutable = {
|
type instrumentation_scope_mutable = {
|
||||||
mutable name : string;
|
mutable name : string;
|
||||||
mutable version : string;
|
mutable version : string;
|
||||||
|
|
@ -45,13 +45,13 @@ let rec decode_any_value d =
|
||||||
let rec loop () =
|
let rec loop () =
|
||||||
let ret:Common_types.any_value = match Pbrt.Decoder.key d with
|
let ret:Common_types.any_value = match Pbrt.Decoder.key d with
|
||||||
| None -> Pbrt.Decoder.malformed_variant "any_value"
|
| None -> Pbrt.Decoder.malformed_variant "any_value"
|
||||||
| Some (7, _) -> (Common_types.Bytes_value (Pbrt.Decoder.bytes d) : Common_types.any_value)
|
|
||||||
| Some (6, _) -> (Common_types.Kvlist_value (decode_key_value_list (Pbrt.Decoder.nested d)) : Common_types.any_value)
|
|
||||||
| Some (5, _) -> (Common_types.Array_value (decode_array_value (Pbrt.Decoder.nested d)) : Common_types.any_value)
|
|
||||||
| Some (4, _) -> (Common_types.Double_value (Pbrt.Decoder.float_as_bits64 d) : Common_types.any_value)
|
|
||||||
| Some (3, _) -> (Common_types.Int_value (Pbrt.Decoder.int64_as_varint d) : Common_types.any_value)
|
|
||||||
| Some (2, _) -> (Common_types.Bool_value (Pbrt.Decoder.bool d) : Common_types.any_value)
|
|
||||||
| Some (1, _) -> (Common_types.String_value (Pbrt.Decoder.string d) : Common_types.any_value)
|
| Some (1, _) -> (Common_types.String_value (Pbrt.Decoder.string d) : Common_types.any_value)
|
||||||
|
| Some (2, _) -> (Common_types.Bool_value (Pbrt.Decoder.bool d) : Common_types.any_value)
|
||||||
|
| Some (3, _) -> (Common_types.Int_value (Pbrt.Decoder.int64_as_varint d) : Common_types.any_value)
|
||||||
|
| Some (4, _) -> (Common_types.Double_value (Pbrt.Decoder.float_as_bits64 d) : Common_types.any_value)
|
||||||
|
| Some (5, _) -> (Common_types.Array_value (decode_array_value (Pbrt.Decoder.nested d)) : Common_types.any_value)
|
||||||
|
| Some (6, _) -> (Common_types.Kvlist_value (decode_key_value_list (Pbrt.Decoder.nested d)) : Common_types.any_value)
|
||||||
|
| Some (7, _) -> (Common_types.Bytes_value (Pbrt.Decoder.bytes d) : Common_types.any_value)
|
||||||
| Some (n, payload_kind) -> (
|
| Some (n, payload_kind) -> (
|
||||||
Pbrt.Decoder.skip d payload_kind;
|
Pbrt.Decoder.skip d payload_kind;
|
||||||
loop ()
|
loop ()
|
||||||
|
|
@ -61,6 +61,25 @@ let rec decode_any_value d =
|
||||||
in
|
in
|
||||||
loop ()
|
loop ()
|
||||||
|
|
||||||
|
and decode_array_value d =
|
||||||
|
let v = default_array_value_mutable () in
|
||||||
|
let continue__= ref true in
|
||||||
|
while !continue__ do
|
||||||
|
match Pbrt.Decoder.key d with
|
||||||
|
| None -> (
|
||||||
|
v.values <- List.rev v.values;
|
||||||
|
); continue__ := false
|
||||||
|
| Some (1, Pbrt.Bytes) -> begin
|
||||||
|
v.values <- (decode_any_value (Pbrt.Decoder.nested d)) :: v.values;
|
||||||
|
end
|
||||||
|
| Some (1, pk) ->
|
||||||
|
Pbrt.Decoder.unexpected_payload "Message(array_value), field(1)" pk
|
||||||
|
| Some (_, payload_kind) -> Pbrt.Decoder.skip d payload_kind
|
||||||
|
done;
|
||||||
|
({
|
||||||
|
Common_types.values = v.values;
|
||||||
|
} : Common_types.array_value)
|
||||||
|
|
||||||
and decode_key_value_list d =
|
and decode_key_value_list d =
|
||||||
let v = default_key_value_list_mutable () in
|
let v = default_key_value_list_mutable () in
|
||||||
let continue__= ref true in
|
let continue__= ref true in
|
||||||
|
|
@ -104,25 +123,6 @@ and decode_key_value d =
|
||||||
Common_types.value = v.value;
|
Common_types.value = v.value;
|
||||||
} : Common_types.key_value)
|
} : Common_types.key_value)
|
||||||
|
|
||||||
and decode_array_value d =
|
|
||||||
let v = default_array_value_mutable () in
|
|
||||||
let continue__= ref true in
|
|
||||||
while !continue__ do
|
|
||||||
match Pbrt.Decoder.key d with
|
|
||||||
| None -> (
|
|
||||||
v.values <- List.rev v.values;
|
|
||||||
); continue__ := false
|
|
||||||
| Some (1, Pbrt.Bytes) -> begin
|
|
||||||
v.values <- (decode_any_value (Pbrt.Decoder.nested d)) :: v.values;
|
|
||||||
end
|
|
||||||
| Some (1, pk) ->
|
|
||||||
Pbrt.Decoder.unexpected_payload "Message(array_value), field(1)" pk
|
|
||||||
| Some (_, payload_kind) -> Pbrt.Decoder.skip d payload_kind
|
|
||||||
done;
|
|
||||||
({
|
|
||||||
Common_types.values = v.values;
|
|
||||||
} : Common_types.array_value)
|
|
||||||
|
|
||||||
let rec decode_instrumentation_scope d =
|
let rec decode_instrumentation_scope d =
|
||||||
let v = default_instrumentation_scope_mutable () in
|
let v = default_instrumentation_scope_mutable () in
|
||||||
let continue__= ref true in
|
let continue__= ref true in
|
||||||
|
|
@ -162,29 +162,36 @@ let rec decode_instrumentation_scope d =
|
||||||
|
|
||||||
let rec encode_any_value (v:Common_types.any_value) encoder =
|
let rec encode_any_value (v:Common_types.any_value) encoder =
|
||||||
begin match v with
|
begin match v with
|
||||||
| Common_types.Bytes_value x ->
|
|
||||||
Pbrt.Encoder.key (7, Pbrt.Bytes) encoder;
|
|
||||||
Pbrt.Encoder.bytes x encoder;
|
|
||||||
| Common_types.Kvlist_value x ->
|
|
||||||
Pbrt.Encoder.key (6, Pbrt.Bytes) encoder;
|
|
||||||
Pbrt.Encoder.nested (encode_key_value_list x) encoder;
|
|
||||||
| Common_types.Array_value x ->
|
|
||||||
Pbrt.Encoder.key (5, Pbrt.Bytes) encoder;
|
|
||||||
Pbrt.Encoder.nested (encode_array_value x) encoder;
|
|
||||||
| Common_types.Double_value x ->
|
|
||||||
Pbrt.Encoder.key (4, Pbrt.Bits64) encoder;
|
|
||||||
Pbrt.Encoder.float_as_bits64 x encoder;
|
|
||||||
| Common_types.Int_value x ->
|
|
||||||
Pbrt.Encoder.key (3, Pbrt.Varint) encoder;
|
|
||||||
Pbrt.Encoder.int64_as_varint x encoder;
|
|
||||||
| Common_types.Bool_value x ->
|
|
||||||
Pbrt.Encoder.key (2, Pbrt.Varint) encoder;
|
|
||||||
Pbrt.Encoder.bool x encoder;
|
|
||||||
| Common_types.String_value x ->
|
| Common_types.String_value x ->
|
||||||
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
||||||
Pbrt.Encoder.string x encoder;
|
Pbrt.Encoder.string x encoder;
|
||||||
|
| Common_types.Bool_value x ->
|
||||||
|
Pbrt.Encoder.key (2, Pbrt.Varint) encoder;
|
||||||
|
Pbrt.Encoder.bool x encoder;
|
||||||
|
| Common_types.Int_value x ->
|
||||||
|
Pbrt.Encoder.key (3, Pbrt.Varint) encoder;
|
||||||
|
Pbrt.Encoder.int64_as_varint x encoder;
|
||||||
|
| Common_types.Double_value x ->
|
||||||
|
Pbrt.Encoder.key (4, Pbrt.Bits64) encoder;
|
||||||
|
Pbrt.Encoder.float_as_bits64 x encoder;
|
||||||
|
| Common_types.Array_value x ->
|
||||||
|
Pbrt.Encoder.key (5, Pbrt.Bytes) encoder;
|
||||||
|
Pbrt.Encoder.nested (encode_array_value x) encoder;
|
||||||
|
| Common_types.Kvlist_value x ->
|
||||||
|
Pbrt.Encoder.key (6, Pbrt.Bytes) encoder;
|
||||||
|
Pbrt.Encoder.nested (encode_key_value_list x) encoder;
|
||||||
|
| Common_types.Bytes_value x ->
|
||||||
|
Pbrt.Encoder.key (7, Pbrt.Bytes) encoder;
|
||||||
|
Pbrt.Encoder.bytes x encoder;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
and encode_array_value (v:Common_types.array_value) encoder =
|
||||||
|
List.iter (fun x ->
|
||||||
|
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
||||||
|
Pbrt.Encoder.nested (encode_any_value x) encoder;
|
||||||
|
) v.Common_types.values;
|
||||||
|
()
|
||||||
|
|
||||||
and encode_key_value_list (v:Common_types.key_value_list) encoder =
|
and encode_key_value_list (v:Common_types.key_value_list) encoder =
|
||||||
List.iter (fun x ->
|
List.iter (fun x ->
|
||||||
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
||||||
|
|
@ -203,13 +210,6 @@ and encode_key_value (v:Common_types.key_value) encoder =
|
||||||
end;
|
end;
|
||||||
()
|
()
|
||||||
|
|
||||||
and encode_array_value (v:Common_types.array_value) encoder =
|
|
||||||
List.iter (fun x ->
|
|
||||||
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
|
||||||
Pbrt.Encoder.nested (encode_any_value x) encoder;
|
|
||||||
) v.Common_types.values;
|
|
||||||
()
|
|
||||||
|
|
||||||
let rec encode_instrumentation_scope (v:Common_types.instrumentation_scope) encoder =
|
let rec encode_instrumentation_scope (v:Common_types.instrumentation_scope) encoder =
|
||||||
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
Pbrt.Encoder.key (1, Pbrt.Bytes) encoder;
|
||||||
Pbrt.Encoder.string v.Common_types.name encoder;
|
Pbrt.Encoder.string v.Common_types.name encoder;
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,15 @@
|
||||||
val encode_any_value : Common_types.any_value -> Pbrt.Encoder.t -> unit
|
val encode_any_value : Common_types.any_value -> Pbrt.Encoder.t -> unit
|
||||||
(** [encode_any_value v encoder] encodes [v] with the given [encoder] *)
|
(** [encode_any_value v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_array_value : Common_types.array_value -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_array_value v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
val encode_key_value_list : Common_types.key_value_list -> Pbrt.Encoder.t -> unit
|
val encode_key_value_list : Common_types.key_value_list -> Pbrt.Encoder.t -> unit
|
||||||
(** [encode_key_value_list v encoder] encodes [v] with the given [encoder] *)
|
(** [encode_key_value_list v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
val encode_key_value : Common_types.key_value -> Pbrt.Encoder.t -> unit
|
val encode_key_value : Common_types.key_value -> Pbrt.Encoder.t -> unit
|
||||||
(** [encode_key_value v encoder] encodes [v] with the given [encoder] *)
|
(** [encode_key_value v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
val encode_array_value : Common_types.array_value -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_array_value v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_instrumentation_scope : Common_types.instrumentation_scope -> Pbrt.Encoder.t -> unit
|
val encode_instrumentation_scope : Common_types.instrumentation_scope -> Pbrt.Encoder.t -> unit
|
||||||
(** [encode_instrumentation_scope v encoder] encodes [v] with the given [encoder] *)
|
(** [encode_instrumentation_scope v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
|
@ -24,14 +24,14 @@ val encode_instrumentation_scope : Common_types.instrumentation_scope -> Pbrt.En
|
||||||
val decode_any_value : Pbrt.Decoder.t -> Common_types.any_value
|
val decode_any_value : Pbrt.Decoder.t -> Common_types.any_value
|
||||||
(** [decode_any_value decoder] decodes a [any_value] value from [decoder] *)
|
(** [decode_any_value decoder] decodes a [any_value] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_array_value : Pbrt.Decoder.t -> Common_types.array_value
|
||||||
|
(** [decode_array_value decoder] decodes a [array_value] value from [decoder] *)
|
||||||
|
|
||||||
val decode_key_value_list : Pbrt.Decoder.t -> Common_types.key_value_list
|
val decode_key_value_list : Pbrt.Decoder.t -> Common_types.key_value_list
|
||||||
(** [decode_key_value_list decoder] decodes a [key_value_list] value from [decoder] *)
|
(** [decode_key_value_list decoder] decodes a [key_value_list] value from [decoder] *)
|
||||||
|
|
||||||
val decode_key_value : Pbrt.Decoder.t -> Common_types.key_value
|
val decode_key_value : Pbrt.Decoder.t -> Common_types.key_value
|
||||||
(** [decode_key_value decoder] decodes a [key_value] value from [decoder] *)
|
(** [decode_key_value decoder] decodes a [key_value] value from [decoder] *)
|
||||||
|
|
||||||
val decode_array_value : Pbrt.Decoder.t -> Common_types.array_value
|
|
||||||
(** [decode_array_value decoder] decodes a [array_value] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_instrumentation_scope : Pbrt.Decoder.t -> Common_types.instrumentation_scope
|
val decode_instrumentation_scope : Pbrt.Decoder.t -> Common_types.instrumentation_scope
|
||||||
(** [decode_instrumentation_scope decoder] decodes a [instrumentation_scope] value from [decoder] *)
|
(** [decode_instrumentation_scope decoder] decodes a [instrumentation_scope] value from [decoder] *)
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,19 @@
|
||||||
|
|
||||||
let rec pp_any_value fmt (v:Common_types.any_value) =
|
let rec pp_any_value fmt (v:Common_types.any_value) =
|
||||||
match v with
|
match v with
|
||||||
| Common_types.Bytes_value x -> Format.fprintf fmt "@[<hv2>Bytes_value(@,%a)@]" Pbrt.Pp.pp_bytes x
|
|
||||||
| Common_types.Kvlist_value x -> Format.fprintf fmt "@[<hv2>Kvlist_value(@,%a)@]" pp_key_value_list x
|
|
||||||
| Common_types.Array_value x -> Format.fprintf fmt "@[<hv2>Array_value(@,%a)@]" pp_array_value x
|
|
||||||
| Common_types.Double_value x -> Format.fprintf fmt "@[<hv2>Double_value(@,%a)@]" Pbrt.Pp.pp_float x
|
|
||||||
| Common_types.Int_value x -> Format.fprintf fmt "@[<hv2>Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x
|
|
||||||
| Common_types.Bool_value x -> Format.fprintf fmt "@[<hv2>Bool_value(@,%a)@]" Pbrt.Pp.pp_bool x
|
|
||||||
| Common_types.String_value x -> Format.fprintf fmt "@[<hv2>String_value(@,%a)@]" Pbrt.Pp.pp_string x
|
| Common_types.String_value x -> Format.fprintf fmt "@[<hv2>String_value(@,%a)@]" Pbrt.Pp.pp_string x
|
||||||
|
| Common_types.Bool_value x -> Format.fprintf fmt "@[<hv2>Bool_value(@,%a)@]" Pbrt.Pp.pp_bool x
|
||||||
|
| Common_types.Int_value x -> Format.fprintf fmt "@[<hv2>Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x
|
||||||
|
| Common_types.Double_value x -> Format.fprintf fmt "@[<hv2>Double_value(@,%a)@]" Pbrt.Pp.pp_float x
|
||||||
|
| Common_types.Array_value x -> Format.fprintf fmt "@[<hv2>Array_value(@,%a)@]" pp_array_value x
|
||||||
|
| Common_types.Kvlist_value x -> Format.fprintf fmt "@[<hv2>Kvlist_value(@,%a)@]" pp_key_value_list x
|
||||||
|
| Common_types.Bytes_value x -> Format.fprintf fmt "@[<hv2>Bytes_value(@,%a)@]" Pbrt.Pp.pp_bytes x
|
||||||
|
|
||||||
|
and pp_array_value fmt (v:Common_types.array_value) =
|
||||||
|
let pp_i fmt () =
|
||||||
|
Pbrt.Pp.pp_record_field ~first:true "values" (Pbrt.Pp.pp_list pp_any_value) fmt v.Common_types.values;
|
||||||
|
in
|
||||||
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
and pp_key_value_list fmt (v:Common_types.key_value_list) =
|
and pp_key_value_list fmt (v:Common_types.key_value_list) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
|
|
@ -23,12 +29,6 @@ and pp_key_value fmt (v:Common_types.key_value) =
|
||||||
in
|
in
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
and pp_array_value fmt (v:Common_types.array_value) =
|
|
||||||
let pp_i fmt () =
|
|
||||||
Pbrt.Pp.pp_record_field ~first:true "values" (Pbrt.Pp.pp_list pp_any_value) fmt v.Common_types.values;
|
|
||||||
in
|
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
|
||||||
|
|
||||||
let rec pp_instrumentation_scope fmt (v:Common_types.instrumentation_scope) =
|
let rec pp_instrumentation_scope fmt (v:Common_types.instrumentation_scope) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.Common_types.name;
|
Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.Common_types.name;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** common.proto Pretty Printing *)
|
(** common.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7,14 +6,14 @@
|
||||||
val pp_any_value : Format.formatter -> Common_types.any_value -> unit
|
val pp_any_value : Format.formatter -> Common_types.any_value -> unit
|
||||||
(** [pp_any_value v] formats v *)
|
(** [pp_any_value v] formats v *)
|
||||||
|
|
||||||
|
val pp_array_value : Format.formatter -> Common_types.array_value -> unit
|
||||||
|
(** [pp_array_value v] formats v *)
|
||||||
|
|
||||||
val pp_key_value_list : Format.formatter -> Common_types.key_value_list -> unit
|
val pp_key_value_list : Format.formatter -> Common_types.key_value_list -> unit
|
||||||
(** [pp_key_value_list v] formats v *)
|
(** [pp_key_value_list v] formats v *)
|
||||||
|
|
||||||
val pp_key_value : Format.formatter -> Common_types.key_value -> unit
|
val pp_key_value : Format.formatter -> Common_types.key_value -> unit
|
||||||
(** [pp_key_value v] formats v *)
|
(** [pp_key_value v] formats v *)
|
||||||
|
|
||||||
val pp_array_value : Format.formatter -> Common_types.array_value -> unit
|
|
||||||
(** [pp_array_value v] formats v *)
|
|
||||||
|
|
||||||
val pp_instrumentation_scope : Format.formatter -> Common_types.instrumentation_scope -> unit
|
val pp_instrumentation_scope : Format.formatter -> Common_types.instrumentation_scope -> unit
|
||||||
(** [pp_instrumentation_scope v] formats v *)
|
(** [pp_instrumentation_scope v] formats v *)
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,17 @@
|
||||||
|
|
||||||
|
|
||||||
type any_value =
|
type any_value =
|
||||||
| Bytes_value of bytes
|
|
||||||
| Kvlist_value of key_value_list
|
|
||||||
| Array_value of array_value
|
|
||||||
| Double_value of float
|
|
||||||
| Int_value of int64
|
|
||||||
| Bool_value of bool
|
|
||||||
| String_value of string
|
| String_value of string
|
||||||
|
| Bool_value of bool
|
||||||
|
| Int_value of int64
|
||||||
|
| Double_value of float
|
||||||
|
| Array_value of array_value
|
||||||
|
| Kvlist_value of key_value_list
|
||||||
|
| Bytes_value of bytes
|
||||||
|
|
||||||
|
and array_value = {
|
||||||
|
values : any_value list;
|
||||||
|
}
|
||||||
|
|
||||||
and key_value_list = {
|
and key_value_list = {
|
||||||
values : key_value list;
|
values : key_value list;
|
||||||
|
|
@ -19,10 +23,6 @@ and key_value = {
|
||||||
value : any_value option;
|
value : any_value option;
|
||||||
}
|
}
|
||||||
|
|
||||||
and array_value = {
|
|
||||||
values : any_value list;
|
|
||||||
}
|
|
||||||
|
|
||||||
type instrumentation_scope = {
|
type instrumentation_scope = {
|
||||||
name : string;
|
name : string;
|
||||||
version : string;
|
version : string;
|
||||||
|
|
@ -30,7 +30,13 @@ type instrumentation_scope = {
|
||||||
dropped_attributes_count : int32;
|
dropped_attributes_count : int32;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec default_any_value () : any_value = Bytes_value (Bytes.create 0)
|
let rec default_any_value () : any_value = String_value ("")
|
||||||
|
|
||||||
|
and default_array_value
|
||||||
|
?values:((values:any_value list) = [])
|
||||||
|
() : array_value = {
|
||||||
|
values;
|
||||||
|
}
|
||||||
|
|
||||||
and default_key_value_list
|
and default_key_value_list
|
||||||
?values:((values:key_value list) = [])
|
?values:((values:key_value list) = [])
|
||||||
|
|
@ -46,12 +52,6 @@ and default_key_value
|
||||||
value;
|
value;
|
||||||
}
|
}
|
||||||
|
|
||||||
and default_array_value
|
|
||||||
?values:((values:any_value list) = [])
|
|
||||||
() : array_value = {
|
|
||||||
values;
|
|
||||||
}
|
|
||||||
|
|
||||||
let rec default_instrumentation_scope
|
let rec default_instrumentation_scope
|
||||||
?name:((name:string) = "")
|
?name:((name:string) = "")
|
||||||
?version:((version:string) = "")
|
?version:((version:string) = "")
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,17 @@
|
||||||
(** {2 Types} *)
|
(** {2 Types} *)
|
||||||
|
|
||||||
type any_value =
|
type any_value =
|
||||||
| Bytes_value of bytes
|
|
||||||
| Kvlist_value of key_value_list
|
|
||||||
| Array_value of array_value
|
|
||||||
| Double_value of float
|
|
||||||
| Int_value of int64
|
|
||||||
| Bool_value of bool
|
|
||||||
| String_value of string
|
| String_value of string
|
||||||
|
| Bool_value of bool
|
||||||
|
| Int_value of int64
|
||||||
|
| Double_value of float
|
||||||
|
| Array_value of array_value
|
||||||
|
| Kvlist_value of key_value_list
|
||||||
|
| Bytes_value of bytes
|
||||||
|
|
||||||
|
and array_value = {
|
||||||
|
values : any_value list;
|
||||||
|
}
|
||||||
|
|
||||||
and key_value_list = {
|
and key_value_list = {
|
||||||
values : key_value list;
|
values : key_value list;
|
||||||
|
|
@ -22,10 +26,6 @@ and key_value = {
|
||||||
value : any_value option;
|
value : any_value option;
|
||||||
}
|
}
|
||||||
|
|
||||||
and array_value = {
|
|
||||||
values : any_value list;
|
|
||||||
}
|
|
||||||
|
|
||||||
type instrumentation_scope = {
|
type instrumentation_scope = {
|
||||||
name : string;
|
name : string;
|
||||||
version : string;
|
version : string;
|
||||||
|
|
@ -39,6 +39,12 @@ type instrumentation_scope = {
|
||||||
val default_any_value : unit -> any_value
|
val default_any_value : unit -> any_value
|
||||||
(** [default_any_value ()] is the default value for type [any_value] *)
|
(** [default_any_value ()] is the default value for type [any_value] *)
|
||||||
|
|
||||||
|
val default_array_value :
|
||||||
|
?values:any_value list ->
|
||||||
|
unit ->
|
||||||
|
array_value
|
||||||
|
(** [default_array_value ()] is the default value for type [array_value] *)
|
||||||
|
|
||||||
val default_key_value_list :
|
val default_key_value_list :
|
||||||
?values:key_value list ->
|
?values:key_value list ->
|
||||||
unit ->
|
unit ->
|
||||||
|
|
@ -52,12 +58,6 @@ val default_key_value :
|
||||||
key_value
|
key_value
|
||||||
(** [default_key_value ()] is the default value for type [key_value] *)
|
(** [default_key_value ()] is the default value for type [key_value] *)
|
||||||
|
|
||||||
val default_array_value :
|
|
||||||
?values:any_value list ->
|
|
||||||
unit ->
|
|
||||||
array_value
|
|
||||||
(** [default_array_value ()] is the default value for type [array_value] *)
|
|
||||||
|
|
||||||
val default_instrumentation_scope :
|
val default_instrumentation_scope :
|
||||||
?name:string ->
|
?name:string ->
|
||||||
?version:string ->
|
?version:string ->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** logs.proto Pretty Printing *)
|
(** logs.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** logs_service.proto Pretty Printing *)
|
(** logs_service.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -3,6 +3,42 @@
|
||||||
|
|
||||||
(** {2 Protobuf Encoding} *)
|
(** {2 Protobuf Encoding} *)
|
||||||
|
|
||||||
|
val encode_exemplar_value : Metrics_types.exemplar_value -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_exemplar_value v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_exemplar : Metrics_types.exemplar -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_exemplar v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_number_data_point_value : Metrics_types.number_data_point_value -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_number_data_point_value v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_number_data_point : Metrics_types.number_data_point -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_number_data_point v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_gauge : Metrics_types.gauge -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_gauge v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_aggregation_temporality : Metrics_types.aggregation_temporality -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_aggregation_temporality v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_sum : Metrics_types.sum -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_sum v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_histogram_data_point : Metrics_types.histogram_data_point -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_histogram_data_point v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_histogram : Metrics_types.histogram -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_histogram v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_exponential_histogram_data_point_buckets : Metrics_types.exponential_histogram_data_point_buckets -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_exponential_histogram_data_point_buckets v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_exponential_histogram_data_point : Metrics_types.exponential_histogram_data_point -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_exponential_histogram_data_point v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
val encode_exponential_histogram : Metrics_types.exponential_histogram -> Pbrt.Encoder.t -> unit
|
||||||
|
(** [encode_exponential_histogram v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
val encode_summary_data_point_value_at_quantile : Metrics_types.summary_data_point_value_at_quantile -> Pbrt.Encoder.t -> unit
|
val encode_summary_data_point_value_at_quantile : Metrics_types.summary_data_point_value_at_quantile -> Pbrt.Encoder.t -> unit
|
||||||
(** [encode_summary_data_point_value_at_quantile v encoder] encodes [v] with the given [encoder] *)
|
(** [encode_summary_data_point_value_at_quantile v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
|
@ -12,42 +48,6 @@ val encode_summary_data_point : Metrics_types.summary_data_point -> Pbrt.Encoder
|
||||||
val encode_summary : Metrics_types.summary -> Pbrt.Encoder.t -> unit
|
val encode_summary : Metrics_types.summary -> Pbrt.Encoder.t -> unit
|
||||||
(** [encode_summary v encoder] encodes [v] with the given [encoder] *)
|
(** [encode_summary v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
val encode_exponential_histogram_data_point_buckets : Metrics_types.exponential_histogram_data_point_buckets -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_exponential_histogram_data_point_buckets v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_exemplar_value : Metrics_types.exemplar_value -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_exemplar_value v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_exemplar : Metrics_types.exemplar -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_exemplar v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_exponential_histogram_data_point : Metrics_types.exponential_histogram_data_point -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_exponential_histogram_data_point v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_aggregation_temporality : Metrics_types.aggregation_temporality -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_aggregation_temporality v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_exponential_histogram : Metrics_types.exponential_histogram -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_exponential_histogram v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_histogram_data_point : Metrics_types.histogram_data_point -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_histogram_data_point v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_histogram : Metrics_types.histogram -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_histogram v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_number_data_point_value : Metrics_types.number_data_point_value -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_number_data_point_value v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_number_data_point : Metrics_types.number_data_point -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_number_data_point v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_sum : Metrics_types.sum -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_sum v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_gauge : Metrics_types.gauge -> Pbrt.Encoder.t -> unit
|
|
||||||
(** [encode_gauge v encoder] encodes [v] with the given [encoder] *)
|
|
||||||
|
|
||||||
val encode_metric_data : Metrics_types.metric_data -> Pbrt.Encoder.t -> unit
|
val encode_metric_data : Metrics_types.metric_data -> Pbrt.Encoder.t -> unit
|
||||||
(** [encode_metric_data v encoder] encodes [v] with the given [encoder] *)
|
(** [encode_metric_data v encoder] encodes [v] with the given [encoder] *)
|
||||||
|
|
||||||
|
|
@ -69,6 +69,42 @@ val encode_data_point_flags : Metrics_types.data_point_flags -> Pbrt.Encoder.t -
|
||||||
|
|
||||||
(** {2 Protobuf Decoding} *)
|
(** {2 Protobuf Decoding} *)
|
||||||
|
|
||||||
|
val decode_exemplar_value : Pbrt.Decoder.t -> Metrics_types.exemplar_value
|
||||||
|
(** [decode_exemplar_value decoder] decodes a [exemplar_value] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_exemplar : Pbrt.Decoder.t -> Metrics_types.exemplar
|
||||||
|
(** [decode_exemplar decoder] decodes a [exemplar] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_number_data_point_value : Pbrt.Decoder.t -> Metrics_types.number_data_point_value
|
||||||
|
(** [decode_number_data_point_value decoder] decodes a [number_data_point_value] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_number_data_point : Pbrt.Decoder.t -> Metrics_types.number_data_point
|
||||||
|
(** [decode_number_data_point decoder] decodes a [number_data_point] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_gauge : Pbrt.Decoder.t -> Metrics_types.gauge
|
||||||
|
(** [decode_gauge decoder] decodes a [gauge] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_aggregation_temporality : Pbrt.Decoder.t -> Metrics_types.aggregation_temporality
|
||||||
|
(** [decode_aggregation_temporality decoder] decodes a [aggregation_temporality] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_sum : Pbrt.Decoder.t -> Metrics_types.sum
|
||||||
|
(** [decode_sum decoder] decodes a [sum] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_histogram_data_point : Pbrt.Decoder.t -> Metrics_types.histogram_data_point
|
||||||
|
(** [decode_histogram_data_point decoder] decodes a [histogram_data_point] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_histogram : Pbrt.Decoder.t -> Metrics_types.histogram
|
||||||
|
(** [decode_histogram decoder] decodes a [histogram] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_exponential_histogram_data_point_buckets : Pbrt.Decoder.t -> Metrics_types.exponential_histogram_data_point_buckets
|
||||||
|
(** [decode_exponential_histogram_data_point_buckets decoder] decodes a [exponential_histogram_data_point_buckets] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_exponential_histogram_data_point : Pbrt.Decoder.t -> Metrics_types.exponential_histogram_data_point
|
||||||
|
(** [decode_exponential_histogram_data_point decoder] decodes a [exponential_histogram_data_point] value from [decoder] *)
|
||||||
|
|
||||||
|
val decode_exponential_histogram : Pbrt.Decoder.t -> Metrics_types.exponential_histogram
|
||||||
|
(** [decode_exponential_histogram decoder] decodes a [exponential_histogram] value from [decoder] *)
|
||||||
|
|
||||||
val decode_summary_data_point_value_at_quantile : Pbrt.Decoder.t -> Metrics_types.summary_data_point_value_at_quantile
|
val decode_summary_data_point_value_at_quantile : Pbrt.Decoder.t -> Metrics_types.summary_data_point_value_at_quantile
|
||||||
(** [decode_summary_data_point_value_at_quantile decoder] decodes a [summary_data_point_value_at_quantile] value from [decoder] *)
|
(** [decode_summary_data_point_value_at_quantile decoder] decodes a [summary_data_point_value_at_quantile] value from [decoder] *)
|
||||||
|
|
||||||
|
|
@ -78,42 +114,6 @@ val decode_summary_data_point : Pbrt.Decoder.t -> Metrics_types.summary_data_poi
|
||||||
val decode_summary : Pbrt.Decoder.t -> Metrics_types.summary
|
val decode_summary : Pbrt.Decoder.t -> Metrics_types.summary
|
||||||
(** [decode_summary decoder] decodes a [summary] value from [decoder] *)
|
(** [decode_summary decoder] decodes a [summary] value from [decoder] *)
|
||||||
|
|
||||||
val decode_exponential_histogram_data_point_buckets : Pbrt.Decoder.t -> Metrics_types.exponential_histogram_data_point_buckets
|
|
||||||
(** [decode_exponential_histogram_data_point_buckets decoder] decodes a [exponential_histogram_data_point_buckets] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_exemplar_value : Pbrt.Decoder.t -> Metrics_types.exemplar_value
|
|
||||||
(** [decode_exemplar_value decoder] decodes a [exemplar_value] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_exemplar : Pbrt.Decoder.t -> Metrics_types.exemplar
|
|
||||||
(** [decode_exemplar decoder] decodes a [exemplar] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_exponential_histogram_data_point : Pbrt.Decoder.t -> Metrics_types.exponential_histogram_data_point
|
|
||||||
(** [decode_exponential_histogram_data_point decoder] decodes a [exponential_histogram_data_point] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_aggregation_temporality : Pbrt.Decoder.t -> Metrics_types.aggregation_temporality
|
|
||||||
(** [decode_aggregation_temporality decoder] decodes a [aggregation_temporality] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_exponential_histogram : Pbrt.Decoder.t -> Metrics_types.exponential_histogram
|
|
||||||
(** [decode_exponential_histogram decoder] decodes a [exponential_histogram] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_histogram_data_point : Pbrt.Decoder.t -> Metrics_types.histogram_data_point
|
|
||||||
(** [decode_histogram_data_point decoder] decodes a [histogram_data_point] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_histogram : Pbrt.Decoder.t -> Metrics_types.histogram
|
|
||||||
(** [decode_histogram decoder] decodes a [histogram] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_number_data_point_value : Pbrt.Decoder.t -> Metrics_types.number_data_point_value
|
|
||||||
(** [decode_number_data_point_value decoder] decodes a [number_data_point_value] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_number_data_point : Pbrt.Decoder.t -> Metrics_types.number_data_point
|
|
||||||
(** [decode_number_data_point decoder] decodes a [number_data_point] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_sum : Pbrt.Decoder.t -> Metrics_types.sum
|
|
||||||
(** [decode_sum decoder] decodes a [sum] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_gauge : Pbrt.Decoder.t -> Metrics_types.gauge
|
|
||||||
(** [decode_gauge decoder] decodes a [gauge] value from [decoder] *)
|
|
||||||
|
|
||||||
val decode_metric_data : Pbrt.Decoder.t -> Metrics_types.metric_data
|
val decode_metric_data : Pbrt.Decoder.t -> Metrics_types.metric_data
|
||||||
(** [decode_metric_data decoder] decodes a [metric_data] value from [decoder] *)
|
(** [decode_metric_data decoder] decodes a [metric_data] value from [decoder] *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,9 @@
|
||||||
[@@@ocaml.warning "-27-30-39"]
|
[@@@ocaml.warning "-27-30-39"]
|
||||||
|
|
||||||
let rec pp_summary_data_point_value_at_quantile fmt (v:Metrics_types.summary_data_point_value_at_quantile) =
|
|
||||||
let pp_i fmt () =
|
|
||||||
Pbrt.Pp.pp_record_field ~first:true "quantile" Pbrt.Pp.pp_float fmt v.Metrics_types.quantile;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_float fmt v.Metrics_types.value;
|
|
||||||
in
|
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
|
||||||
|
|
||||||
let rec pp_summary_data_point fmt (v:Metrics_types.summary_data_point) =
|
|
||||||
let pp_i fmt () =
|
|
||||||
Pbrt.Pp.pp_record_field ~first:true "attributes" (Pbrt.Pp.pp_list Common_pp.pp_key_value) fmt v.Metrics_types.attributes;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "start_time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.start_time_unix_nano;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.time_unix_nano;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "count" Pbrt.Pp.pp_int64 fmt v.Metrics_types.count;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "sum" Pbrt.Pp.pp_float fmt v.Metrics_types.sum;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "quantile_values" (Pbrt.Pp.pp_list pp_summary_data_point_value_at_quantile) fmt v.Metrics_types.quantile_values;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.Metrics_types.flags;
|
|
||||||
in
|
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
|
||||||
|
|
||||||
let rec pp_summary fmt (v:Metrics_types.summary) =
|
|
||||||
let pp_i fmt () =
|
|
||||||
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_summary_data_point) fmt v.Metrics_types.data_points;
|
|
||||||
in
|
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
|
||||||
|
|
||||||
let rec pp_exponential_histogram_data_point_buckets fmt (v:Metrics_types.exponential_histogram_data_point_buckets) =
|
|
||||||
let pp_i fmt () =
|
|
||||||
Pbrt.Pp.pp_record_field ~first:true "offset" Pbrt.Pp.pp_int32 fmt v.Metrics_types.offset;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "bucket_counts" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.Metrics_types.bucket_counts;
|
|
||||||
in
|
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
|
||||||
|
|
||||||
let rec pp_exemplar_value fmt (v:Metrics_types.exemplar_value) =
|
let rec pp_exemplar_value fmt (v:Metrics_types.exemplar_value) =
|
||||||
match v with
|
match v with
|
||||||
| Metrics_types.As_int x -> Format.fprintf fmt "@[<hv2>As_int(@,%a)@]" Pbrt.Pp.pp_int64 x
|
|
||||||
| Metrics_types.As_double x -> Format.fprintf fmt "@[<hv2>As_double(@,%a)@]" Pbrt.Pp.pp_float x
|
| Metrics_types.As_double x -> Format.fprintf fmt "@[<hv2>As_double(@,%a)@]" Pbrt.Pp.pp_float x
|
||||||
|
| Metrics_types.As_int x -> Format.fprintf fmt "@[<hv2>As_int(@,%a)@]" Pbrt.Pp.pp_int64 x
|
||||||
|
|
||||||
and pp_exemplar fmt (v:Metrics_types.exemplar) =
|
and pp_exemplar fmt (v:Metrics_types.exemplar) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
|
|
@ -47,22 +15,25 @@ and pp_exemplar fmt (v:Metrics_types.exemplar) =
|
||||||
in
|
in
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
let rec pp_exponential_histogram_data_point fmt (v:Metrics_types.exponential_histogram_data_point) =
|
let rec pp_number_data_point_value fmt (v:Metrics_types.number_data_point_value) =
|
||||||
|
match v with
|
||||||
|
| Metrics_types.As_double x -> Format.fprintf fmt "@[<hv2>As_double(@,%a)@]" Pbrt.Pp.pp_float x
|
||||||
|
| Metrics_types.As_int x -> Format.fprintf fmt "@[<hv2>As_int(@,%a)@]" Pbrt.Pp.pp_int64 x
|
||||||
|
|
||||||
|
and pp_number_data_point fmt (v:Metrics_types.number_data_point) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
Pbrt.Pp.pp_record_field ~first:true "attributes" (Pbrt.Pp.pp_list Common_pp.pp_key_value) fmt v.Metrics_types.attributes;
|
Pbrt.Pp.pp_record_field ~first:true "attributes" (Pbrt.Pp.pp_list Common_pp.pp_key_value) fmt v.Metrics_types.attributes;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "start_time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.start_time_unix_nano;
|
Pbrt.Pp.pp_record_field ~first:false "start_time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.start_time_unix_nano;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.time_unix_nano;
|
Pbrt.Pp.pp_record_field ~first:false "time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.time_unix_nano;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "count" Pbrt.Pp.pp_int64 fmt v.Metrics_types.count;
|
Pbrt.Pp.pp_record_field ~first:false "value" pp_number_data_point_value fmt v.Metrics_types.value;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "sum" (Pbrt.Pp.pp_option Pbrt.Pp.pp_float) fmt v.Metrics_types.sum;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "scale" Pbrt.Pp.pp_int32 fmt v.Metrics_types.scale;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "zero_count" Pbrt.Pp.pp_int64 fmt v.Metrics_types.zero_count;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "positive" (Pbrt.Pp.pp_option pp_exponential_histogram_data_point_buckets) fmt v.Metrics_types.positive;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "negative" (Pbrt.Pp.pp_option pp_exponential_histogram_data_point_buckets) fmt v.Metrics_types.negative;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.Metrics_types.flags;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "exemplars" (Pbrt.Pp.pp_list pp_exemplar) fmt v.Metrics_types.exemplars;
|
Pbrt.Pp.pp_record_field ~first:false "exemplars" (Pbrt.Pp.pp_list pp_exemplar) fmt v.Metrics_types.exemplars;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "min" (Pbrt.Pp.pp_option Pbrt.Pp.pp_float) fmt v.Metrics_types.min;
|
Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.Metrics_types.flags;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "max" (Pbrt.Pp.pp_option Pbrt.Pp.pp_float) fmt v.Metrics_types.max;
|
in
|
||||||
Pbrt.Pp.pp_record_field ~first:false "zero_threshold" Pbrt.Pp.pp_float fmt v.Metrics_types.zero_threshold;
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
|
let rec pp_gauge fmt (v:Metrics_types.gauge) =
|
||||||
|
let pp_i fmt () =
|
||||||
|
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_number_data_point) fmt v.Metrics_types.data_points;
|
||||||
in
|
in
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
|
|
@ -72,10 +43,11 @@ let rec pp_aggregation_temporality fmt (v:Metrics_types.aggregation_temporality)
|
||||||
| Metrics_types.Aggregation_temporality_delta -> Format.fprintf fmt "Aggregation_temporality_delta"
|
| Metrics_types.Aggregation_temporality_delta -> Format.fprintf fmt "Aggregation_temporality_delta"
|
||||||
| Metrics_types.Aggregation_temporality_cumulative -> Format.fprintf fmt "Aggregation_temporality_cumulative"
|
| Metrics_types.Aggregation_temporality_cumulative -> Format.fprintf fmt "Aggregation_temporality_cumulative"
|
||||||
|
|
||||||
let rec pp_exponential_histogram fmt (v:Metrics_types.exponential_histogram) =
|
let rec pp_sum fmt (v:Metrics_types.sum) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_exponential_histogram_data_point) fmt v.Metrics_types.data_points;
|
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_number_data_point) fmt v.Metrics_types.data_points;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "aggregation_temporality" pp_aggregation_temporality fmt v.Metrics_types.aggregation_temporality;
|
Pbrt.Pp.pp_record_field ~first:false "aggregation_temporality" pp_aggregation_temporality fmt v.Metrics_types.aggregation_temporality;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "is_monotonic" Pbrt.Pp.pp_bool fmt v.Metrics_types.is_monotonic;
|
||||||
in
|
in
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
|
|
@ -102,43 +74,71 @@ let rec pp_histogram fmt (v:Metrics_types.histogram) =
|
||||||
in
|
in
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
let rec pp_number_data_point_value fmt (v:Metrics_types.number_data_point_value) =
|
let rec pp_exponential_histogram_data_point_buckets fmt (v:Metrics_types.exponential_histogram_data_point_buckets) =
|
||||||
match v with
|
let pp_i fmt () =
|
||||||
| Metrics_types.As_int x -> Format.fprintf fmt "@[<hv2>As_int(@,%a)@]" Pbrt.Pp.pp_int64 x
|
Pbrt.Pp.pp_record_field ~first:true "offset" Pbrt.Pp.pp_int32 fmt v.Metrics_types.offset;
|
||||||
| Metrics_types.As_double x -> Format.fprintf fmt "@[<hv2>As_double(@,%a)@]" Pbrt.Pp.pp_float x
|
Pbrt.Pp.pp_record_field ~first:false "bucket_counts" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.Metrics_types.bucket_counts;
|
||||||
|
in
|
||||||
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
and pp_number_data_point fmt (v:Metrics_types.number_data_point) =
|
let rec pp_exponential_histogram_data_point fmt (v:Metrics_types.exponential_histogram_data_point) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
Pbrt.Pp.pp_record_field ~first:true "attributes" (Pbrt.Pp.pp_list Common_pp.pp_key_value) fmt v.Metrics_types.attributes;
|
Pbrt.Pp.pp_record_field ~first:true "attributes" (Pbrt.Pp.pp_list Common_pp.pp_key_value) fmt v.Metrics_types.attributes;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "start_time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.start_time_unix_nano;
|
Pbrt.Pp.pp_record_field ~first:false "start_time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.start_time_unix_nano;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.time_unix_nano;
|
Pbrt.Pp.pp_record_field ~first:false "time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.time_unix_nano;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "value" pp_number_data_point_value fmt v.Metrics_types.value;
|
Pbrt.Pp.pp_record_field ~first:false "count" Pbrt.Pp.pp_int64 fmt v.Metrics_types.count;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "sum" (Pbrt.Pp.pp_option Pbrt.Pp.pp_float) fmt v.Metrics_types.sum;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "scale" Pbrt.Pp.pp_int32 fmt v.Metrics_types.scale;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "zero_count" Pbrt.Pp.pp_int64 fmt v.Metrics_types.zero_count;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "positive" (Pbrt.Pp.pp_option pp_exponential_histogram_data_point_buckets) fmt v.Metrics_types.positive;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "negative" (Pbrt.Pp.pp_option pp_exponential_histogram_data_point_buckets) fmt v.Metrics_types.negative;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.Metrics_types.flags;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "exemplars" (Pbrt.Pp.pp_list pp_exemplar) fmt v.Metrics_types.exemplars;
|
Pbrt.Pp.pp_record_field ~first:false "exemplars" (Pbrt.Pp.pp_list pp_exemplar) fmt v.Metrics_types.exemplars;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "min" (Pbrt.Pp.pp_option Pbrt.Pp.pp_float) fmt v.Metrics_types.min;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "max" (Pbrt.Pp.pp_option Pbrt.Pp.pp_float) fmt v.Metrics_types.max;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "zero_threshold" Pbrt.Pp.pp_float fmt v.Metrics_types.zero_threshold;
|
||||||
|
in
|
||||||
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
|
let rec pp_exponential_histogram fmt (v:Metrics_types.exponential_histogram) =
|
||||||
|
let pp_i fmt () =
|
||||||
|
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_exponential_histogram_data_point) fmt v.Metrics_types.data_points;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "aggregation_temporality" pp_aggregation_temporality fmt v.Metrics_types.aggregation_temporality;
|
||||||
|
in
|
||||||
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
|
let rec pp_summary_data_point_value_at_quantile fmt (v:Metrics_types.summary_data_point_value_at_quantile) =
|
||||||
|
let pp_i fmt () =
|
||||||
|
Pbrt.Pp.pp_record_field ~first:true "quantile" Pbrt.Pp.pp_float fmt v.Metrics_types.quantile;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_float fmt v.Metrics_types.value;
|
||||||
|
in
|
||||||
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
|
let rec pp_summary_data_point fmt (v:Metrics_types.summary_data_point) =
|
||||||
|
let pp_i fmt () =
|
||||||
|
Pbrt.Pp.pp_record_field ~first:true "attributes" (Pbrt.Pp.pp_list Common_pp.pp_key_value) fmt v.Metrics_types.attributes;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "start_time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.start_time_unix_nano;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "time_unix_nano" Pbrt.Pp.pp_int64 fmt v.Metrics_types.time_unix_nano;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "count" Pbrt.Pp.pp_int64 fmt v.Metrics_types.count;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "sum" Pbrt.Pp.pp_float fmt v.Metrics_types.sum;
|
||||||
|
Pbrt.Pp.pp_record_field ~first:false "quantile_values" (Pbrt.Pp.pp_list pp_summary_data_point_value_at_quantile) fmt v.Metrics_types.quantile_values;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.Metrics_types.flags;
|
Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.Metrics_types.flags;
|
||||||
in
|
in
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
let rec pp_sum fmt (v:Metrics_types.sum) =
|
let rec pp_summary fmt (v:Metrics_types.summary) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_number_data_point) fmt v.Metrics_types.data_points;
|
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_summary_data_point) fmt v.Metrics_types.data_points;
|
||||||
Pbrt.Pp.pp_record_field ~first:false "aggregation_temporality" pp_aggregation_temporality fmt v.Metrics_types.aggregation_temporality;
|
|
||||||
Pbrt.Pp.pp_record_field ~first:false "is_monotonic" Pbrt.Pp.pp_bool fmt v.Metrics_types.is_monotonic;
|
|
||||||
in
|
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
|
||||||
|
|
||||||
let rec pp_gauge fmt (v:Metrics_types.gauge) =
|
|
||||||
let pp_i fmt () =
|
|
||||||
Pbrt.Pp.pp_record_field ~first:true "data_points" (Pbrt.Pp.pp_list pp_number_data_point) fmt v.Metrics_types.data_points;
|
|
||||||
in
|
in
|
||||||
Pbrt.Pp.pp_brk pp_i fmt ()
|
Pbrt.Pp.pp_brk pp_i fmt ()
|
||||||
|
|
||||||
let rec pp_metric_data fmt (v:Metrics_types.metric_data) =
|
let rec pp_metric_data fmt (v:Metrics_types.metric_data) =
|
||||||
match v with
|
match v with
|
||||||
| Metrics_types.Summary x -> Format.fprintf fmt "@[<hv2>Summary(@,%a)@]" pp_summary x
|
|
||||||
| Metrics_types.Exponential_histogram x -> Format.fprintf fmt "@[<hv2>Exponential_histogram(@,%a)@]" pp_exponential_histogram x
|
|
||||||
| Metrics_types.Histogram x -> Format.fprintf fmt "@[<hv2>Histogram(@,%a)@]" pp_histogram x
|
|
||||||
| Metrics_types.Sum x -> Format.fprintf fmt "@[<hv2>Sum(@,%a)@]" pp_sum x
|
|
||||||
| Metrics_types.Gauge x -> Format.fprintf fmt "@[<hv2>Gauge(@,%a)@]" pp_gauge x
|
| Metrics_types.Gauge x -> Format.fprintf fmt "@[<hv2>Gauge(@,%a)@]" pp_gauge x
|
||||||
|
| Metrics_types.Sum x -> Format.fprintf fmt "@[<hv2>Sum(@,%a)@]" pp_sum x
|
||||||
|
| Metrics_types.Histogram x -> Format.fprintf fmt "@[<hv2>Histogram(@,%a)@]" pp_histogram x
|
||||||
|
| Metrics_types.Exponential_histogram x -> Format.fprintf fmt "@[<hv2>Exponential_histogram(@,%a)@]" pp_exponential_histogram x
|
||||||
|
| Metrics_types.Summary x -> Format.fprintf fmt "@[<hv2>Summary(@,%a)@]" pp_summary x
|
||||||
|
|
||||||
and pp_metric fmt (v:Metrics_types.metric) =
|
and pp_metric fmt (v:Metrics_types.metric) =
|
||||||
let pp_i fmt () =
|
let pp_i fmt () =
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,44 @@
|
||||||
|
|
||||||
(** metrics.proto Pretty Printing *)
|
(** metrics.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
(** {2 Formatters} *)
|
(** {2 Formatters} *)
|
||||||
|
|
||||||
|
val pp_exemplar_value : Format.formatter -> Metrics_types.exemplar_value -> unit
|
||||||
|
(** [pp_exemplar_value v] formats v *)
|
||||||
|
|
||||||
|
val pp_exemplar : Format.formatter -> Metrics_types.exemplar -> unit
|
||||||
|
(** [pp_exemplar v] formats v *)
|
||||||
|
|
||||||
|
val pp_number_data_point_value : Format.formatter -> Metrics_types.number_data_point_value -> unit
|
||||||
|
(** [pp_number_data_point_value v] formats v *)
|
||||||
|
|
||||||
|
val pp_number_data_point : Format.formatter -> Metrics_types.number_data_point -> unit
|
||||||
|
(** [pp_number_data_point v] formats v *)
|
||||||
|
|
||||||
|
val pp_gauge : Format.formatter -> Metrics_types.gauge -> unit
|
||||||
|
(** [pp_gauge v] formats v *)
|
||||||
|
|
||||||
|
val pp_aggregation_temporality : Format.formatter -> Metrics_types.aggregation_temporality -> unit
|
||||||
|
(** [pp_aggregation_temporality v] formats v *)
|
||||||
|
|
||||||
|
val pp_sum : Format.formatter -> Metrics_types.sum -> unit
|
||||||
|
(** [pp_sum v] formats v *)
|
||||||
|
|
||||||
|
val pp_histogram_data_point : Format.formatter -> Metrics_types.histogram_data_point -> unit
|
||||||
|
(** [pp_histogram_data_point v] formats v *)
|
||||||
|
|
||||||
|
val pp_histogram : Format.formatter -> Metrics_types.histogram -> unit
|
||||||
|
(** [pp_histogram v] formats v *)
|
||||||
|
|
||||||
|
val pp_exponential_histogram_data_point_buckets : Format.formatter -> Metrics_types.exponential_histogram_data_point_buckets -> unit
|
||||||
|
(** [pp_exponential_histogram_data_point_buckets v] formats v *)
|
||||||
|
|
||||||
|
val pp_exponential_histogram_data_point : Format.formatter -> Metrics_types.exponential_histogram_data_point -> unit
|
||||||
|
(** [pp_exponential_histogram_data_point v] formats v *)
|
||||||
|
|
||||||
|
val pp_exponential_histogram : Format.formatter -> Metrics_types.exponential_histogram -> unit
|
||||||
|
(** [pp_exponential_histogram v] formats v *)
|
||||||
|
|
||||||
val pp_summary_data_point_value_at_quantile : Format.formatter -> Metrics_types.summary_data_point_value_at_quantile -> unit
|
val pp_summary_data_point_value_at_quantile : Format.formatter -> Metrics_types.summary_data_point_value_at_quantile -> unit
|
||||||
(** [pp_summary_data_point_value_at_quantile v] formats v *)
|
(** [pp_summary_data_point_value_at_quantile v] formats v *)
|
||||||
|
|
||||||
|
|
@ -13,42 +48,6 @@ val pp_summary_data_point : Format.formatter -> Metrics_types.summary_data_point
|
||||||
val pp_summary : Format.formatter -> Metrics_types.summary -> unit
|
val pp_summary : Format.formatter -> Metrics_types.summary -> unit
|
||||||
(** [pp_summary v] formats v *)
|
(** [pp_summary v] formats v *)
|
||||||
|
|
||||||
val pp_exponential_histogram_data_point_buckets : Format.formatter -> Metrics_types.exponential_histogram_data_point_buckets -> unit
|
|
||||||
(** [pp_exponential_histogram_data_point_buckets v] formats v *)
|
|
||||||
|
|
||||||
val pp_exemplar_value : Format.formatter -> Metrics_types.exemplar_value -> unit
|
|
||||||
(** [pp_exemplar_value v] formats v *)
|
|
||||||
|
|
||||||
val pp_exemplar : Format.formatter -> Metrics_types.exemplar -> unit
|
|
||||||
(** [pp_exemplar v] formats v *)
|
|
||||||
|
|
||||||
val pp_exponential_histogram_data_point : Format.formatter -> Metrics_types.exponential_histogram_data_point -> unit
|
|
||||||
(** [pp_exponential_histogram_data_point v] formats v *)
|
|
||||||
|
|
||||||
val pp_aggregation_temporality : Format.formatter -> Metrics_types.aggregation_temporality -> unit
|
|
||||||
(** [pp_aggregation_temporality v] formats v *)
|
|
||||||
|
|
||||||
val pp_exponential_histogram : Format.formatter -> Metrics_types.exponential_histogram -> unit
|
|
||||||
(** [pp_exponential_histogram v] formats v *)
|
|
||||||
|
|
||||||
val pp_histogram_data_point : Format.formatter -> Metrics_types.histogram_data_point -> unit
|
|
||||||
(** [pp_histogram_data_point v] formats v *)
|
|
||||||
|
|
||||||
val pp_histogram : Format.formatter -> Metrics_types.histogram -> unit
|
|
||||||
(** [pp_histogram v] formats v *)
|
|
||||||
|
|
||||||
val pp_number_data_point_value : Format.formatter -> Metrics_types.number_data_point_value -> unit
|
|
||||||
(** [pp_number_data_point_value v] formats v *)
|
|
||||||
|
|
||||||
val pp_number_data_point : Format.formatter -> Metrics_types.number_data_point -> unit
|
|
||||||
(** [pp_number_data_point v] formats v *)
|
|
||||||
|
|
||||||
val pp_sum : Format.formatter -> Metrics_types.sum -> unit
|
|
||||||
(** [pp_sum v] formats v *)
|
|
||||||
|
|
||||||
val pp_gauge : Format.formatter -> Metrics_types.gauge -> unit
|
|
||||||
(** [pp_gauge v] formats v *)
|
|
||||||
|
|
||||||
val pp_metric_data : Format.formatter -> Metrics_types.metric_data -> unit
|
val pp_metric_data : Format.formatter -> Metrics_types.metric_data -> unit
|
||||||
(** [pp_metric_data v] formats v *)
|
(** [pp_metric_data v] formats v *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** metrics_service.proto Pretty Printing *)
|
(** metrics_service.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,9 @@
|
||||||
[@@@ocaml.warning "-27-30-39"]
|
[@@@ocaml.warning "-27-30-39"]
|
||||||
|
|
||||||
|
|
||||||
type summary_data_point_value_at_quantile = {
|
|
||||||
quantile : float;
|
|
||||||
value : float;
|
|
||||||
}
|
|
||||||
|
|
||||||
type summary_data_point = {
|
|
||||||
attributes : Common_types.key_value list;
|
|
||||||
start_time_unix_nano : int64;
|
|
||||||
time_unix_nano : int64;
|
|
||||||
count : int64;
|
|
||||||
sum : float;
|
|
||||||
quantile_values : summary_data_point_value_at_quantile list;
|
|
||||||
flags : int32;
|
|
||||||
}
|
|
||||||
|
|
||||||
type summary = {
|
|
||||||
data_points : summary_data_point list;
|
|
||||||
}
|
|
||||||
|
|
||||||
type exponential_histogram_data_point_buckets = {
|
|
||||||
offset : int32;
|
|
||||||
bucket_counts : int64 list;
|
|
||||||
}
|
|
||||||
|
|
||||||
type exemplar_value =
|
type exemplar_value =
|
||||||
| As_int of int64
|
|
||||||
| As_double of float
|
| As_double of float
|
||||||
|
| As_int of int64
|
||||||
|
|
||||||
and exemplar = {
|
and exemplar = {
|
||||||
filtered_attributes : Common_types.key_value list;
|
filtered_attributes : Common_types.key_value list;
|
||||||
|
|
@ -37,21 +13,21 @@ and exemplar = {
|
||||||
trace_id : bytes;
|
trace_id : bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram_data_point = {
|
type number_data_point_value =
|
||||||
|
| As_double of float
|
||||||
|
| As_int of int64
|
||||||
|
|
||||||
|
and number_data_point = {
|
||||||
attributes : Common_types.key_value list;
|
attributes : Common_types.key_value list;
|
||||||
start_time_unix_nano : int64;
|
start_time_unix_nano : int64;
|
||||||
time_unix_nano : int64;
|
time_unix_nano : int64;
|
||||||
count : int64;
|
value : number_data_point_value;
|
||||||
sum : float option;
|
|
||||||
scale : int32;
|
|
||||||
zero_count : int64;
|
|
||||||
positive : exponential_histogram_data_point_buckets option;
|
|
||||||
negative : exponential_histogram_data_point_buckets option;
|
|
||||||
flags : int32;
|
|
||||||
exemplars : exemplar list;
|
exemplars : exemplar list;
|
||||||
min : float option;
|
flags : int32;
|
||||||
max : float option;
|
}
|
||||||
zero_threshold : float;
|
|
||||||
|
type gauge = {
|
||||||
|
data_points : number_data_point list;
|
||||||
}
|
}
|
||||||
|
|
||||||
type aggregation_temporality =
|
type aggregation_temporality =
|
||||||
|
|
@ -59,9 +35,10 @@ type aggregation_temporality =
|
||||||
| Aggregation_temporality_delta
|
| Aggregation_temporality_delta
|
||||||
| Aggregation_temporality_cumulative
|
| Aggregation_temporality_cumulative
|
||||||
|
|
||||||
type exponential_histogram = {
|
type sum = {
|
||||||
data_points : exponential_histogram_data_point list;
|
data_points : number_data_point list;
|
||||||
aggregation_temporality : aggregation_temporality;
|
aggregation_temporality : aggregation_temporality;
|
||||||
|
is_monotonic : bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
type histogram_data_point = {
|
type histogram_data_point = {
|
||||||
|
|
@ -83,35 +60,58 @@ type histogram = {
|
||||||
aggregation_temporality : aggregation_temporality;
|
aggregation_temporality : aggregation_temporality;
|
||||||
}
|
}
|
||||||
|
|
||||||
type number_data_point_value =
|
type exponential_histogram_data_point_buckets = {
|
||||||
| As_int of int64
|
offset : int32;
|
||||||
| As_double of float
|
bucket_counts : int64 list;
|
||||||
|
}
|
||||||
|
|
||||||
and number_data_point = {
|
type exponential_histogram_data_point = {
|
||||||
attributes : Common_types.key_value list;
|
attributes : Common_types.key_value list;
|
||||||
start_time_unix_nano : int64;
|
start_time_unix_nano : int64;
|
||||||
time_unix_nano : int64;
|
time_unix_nano : int64;
|
||||||
value : number_data_point_value;
|
count : int64;
|
||||||
|
sum : float option;
|
||||||
|
scale : int32;
|
||||||
|
zero_count : int64;
|
||||||
|
positive : exponential_histogram_data_point_buckets option;
|
||||||
|
negative : exponential_histogram_data_point_buckets option;
|
||||||
|
flags : int32;
|
||||||
exemplars : exemplar list;
|
exemplars : exemplar list;
|
||||||
|
min : float option;
|
||||||
|
max : float option;
|
||||||
|
zero_threshold : float;
|
||||||
|
}
|
||||||
|
|
||||||
|
type exponential_histogram = {
|
||||||
|
data_points : exponential_histogram_data_point list;
|
||||||
|
aggregation_temporality : aggregation_temporality;
|
||||||
|
}
|
||||||
|
|
||||||
|
type summary_data_point_value_at_quantile = {
|
||||||
|
quantile : float;
|
||||||
|
value : float;
|
||||||
|
}
|
||||||
|
|
||||||
|
type summary_data_point = {
|
||||||
|
attributes : Common_types.key_value list;
|
||||||
|
start_time_unix_nano : int64;
|
||||||
|
time_unix_nano : int64;
|
||||||
|
count : int64;
|
||||||
|
sum : float;
|
||||||
|
quantile_values : summary_data_point_value_at_quantile list;
|
||||||
flags : int32;
|
flags : int32;
|
||||||
}
|
}
|
||||||
|
|
||||||
type sum = {
|
type summary = {
|
||||||
data_points : number_data_point list;
|
data_points : summary_data_point list;
|
||||||
aggregation_temporality : aggregation_temporality;
|
|
||||||
is_monotonic : bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
type gauge = {
|
|
||||||
data_points : number_data_point list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type metric_data =
|
type metric_data =
|
||||||
| Summary of summary
|
|
||||||
| Exponential_histogram of exponential_histogram
|
|
||||||
| Histogram of histogram
|
|
||||||
| Sum of sum
|
|
||||||
| Gauge of gauge
|
| Gauge of gauge
|
||||||
|
| Sum of sum
|
||||||
|
| Histogram of histogram
|
||||||
|
| Exponential_histogram of exponential_histogram
|
||||||
|
| Summary of summary
|
||||||
|
|
||||||
and metric = {
|
and metric = {
|
||||||
name : string;
|
name : string;
|
||||||
|
|
@ -140,52 +140,12 @@ type data_point_flags =
|
||||||
| Data_point_flags_do_not_use
|
| Data_point_flags_do_not_use
|
||||||
| Data_point_flags_no_recorded_value_mask
|
| Data_point_flags_no_recorded_value_mask
|
||||||
|
|
||||||
let rec default_summary_data_point_value_at_quantile
|
let rec default_exemplar_value () : exemplar_value = As_double (0.)
|
||||||
?quantile:((quantile:float) = 0.)
|
|
||||||
?value:((value:float) = 0.)
|
|
||||||
() : summary_data_point_value_at_quantile = {
|
|
||||||
quantile;
|
|
||||||
value;
|
|
||||||
}
|
|
||||||
|
|
||||||
let rec default_summary_data_point
|
|
||||||
?attributes:((attributes:Common_types.key_value list) = [])
|
|
||||||
?start_time_unix_nano:((start_time_unix_nano:int64) = 0L)
|
|
||||||
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
|
||||||
?count:((count:int64) = 0L)
|
|
||||||
?sum:((sum:float) = 0.)
|
|
||||||
?quantile_values:((quantile_values:summary_data_point_value_at_quantile list) = [])
|
|
||||||
?flags:((flags:int32) = 0l)
|
|
||||||
() : summary_data_point = {
|
|
||||||
attributes;
|
|
||||||
start_time_unix_nano;
|
|
||||||
time_unix_nano;
|
|
||||||
count;
|
|
||||||
sum;
|
|
||||||
quantile_values;
|
|
||||||
flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
let rec default_summary
|
|
||||||
?data_points:((data_points:summary_data_point list) = [])
|
|
||||||
() : summary = {
|
|
||||||
data_points;
|
|
||||||
}
|
|
||||||
|
|
||||||
let rec default_exponential_histogram_data_point_buckets
|
|
||||||
?offset:((offset:int32) = 0l)
|
|
||||||
?bucket_counts:((bucket_counts:int64 list) = [])
|
|
||||||
() : exponential_histogram_data_point_buckets = {
|
|
||||||
offset;
|
|
||||||
bucket_counts;
|
|
||||||
}
|
|
||||||
|
|
||||||
let rec default_exemplar_value () : exemplar_value = As_int (0L)
|
|
||||||
|
|
||||||
and default_exemplar
|
and default_exemplar
|
||||||
?filtered_attributes:((filtered_attributes:Common_types.key_value list) = [])
|
?filtered_attributes:((filtered_attributes:Common_types.key_value list) = [])
|
||||||
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
||||||
?value:((value:exemplar_value) = As_int (0L))
|
?value:((value:exemplar_value) = As_double (0.))
|
||||||
?span_id:((span_id:bytes) = Bytes.create 0)
|
?span_id:((span_id:bytes) = Bytes.create 0)
|
||||||
?trace_id:((trace_id:bytes) = Bytes.create 0)
|
?trace_id:((trace_id:bytes) = Bytes.create 0)
|
||||||
() : exemplar = {
|
() : exemplar = {
|
||||||
|
|
@ -196,46 +156,40 @@ and default_exemplar
|
||||||
trace_id;
|
trace_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec default_exponential_histogram_data_point
|
let rec default_number_data_point_value () : number_data_point_value = As_double (0.)
|
||||||
|
|
||||||
|
and default_number_data_point
|
||||||
?attributes:((attributes:Common_types.key_value list) = [])
|
?attributes:((attributes:Common_types.key_value list) = [])
|
||||||
?start_time_unix_nano:((start_time_unix_nano:int64) = 0L)
|
?start_time_unix_nano:((start_time_unix_nano:int64) = 0L)
|
||||||
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
||||||
?count:((count:int64) = 0L)
|
?value:((value:number_data_point_value) = As_double (0.))
|
||||||
?sum:((sum:float option) = None)
|
|
||||||
?scale:((scale:int32) = 0l)
|
|
||||||
?zero_count:((zero_count:int64) = 0L)
|
|
||||||
?positive:((positive:exponential_histogram_data_point_buckets option) = None)
|
|
||||||
?negative:((negative:exponential_histogram_data_point_buckets option) = None)
|
|
||||||
?flags:((flags:int32) = 0l)
|
|
||||||
?exemplars:((exemplars:exemplar list) = [])
|
?exemplars:((exemplars:exemplar list) = [])
|
||||||
?min:((min:float option) = None)
|
?flags:((flags:int32) = 0l)
|
||||||
?max:((max:float option) = None)
|
() : number_data_point = {
|
||||||
?zero_threshold:((zero_threshold:float) = 0.)
|
|
||||||
() : exponential_histogram_data_point = {
|
|
||||||
attributes;
|
attributes;
|
||||||
start_time_unix_nano;
|
start_time_unix_nano;
|
||||||
time_unix_nano;
|
time_unix_nano;
|
||||||
count;
|
value;
|
||||||
sum;
|
|
||||||
scale;
|
|
||||||
zero_count;
|
|
||||||
positive;
|
|
||||||
negative;
|
|
||||||
flags;
|
|
||||||
exemplars;
|
exemplars;
|
||||||
min;
|
flags;
|
||||||
max;
|
}
|
||||||
zero_threshold;
|
|
||||||
|
let rec default_gauge
|
||||||
|
?data_points:((data_points:number_data_point list) = [])
|
||||||
|
() : gauge = {
|
||||||
|
data_points;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec default_aggregation_temporality () = (Aggregation_temporality_unspecified:aggregation_temporality)
|
let rec default_aggregation_temporality () = (Aggregation_temporality_unspecified:aggregation_temporality)
|
||||||
|
|
||||||
let rec default_exponential_histogram
|
let rec default_sum
|
||||||
?data_points:((data_points:exponential_histogram_data_point list) = [])
|
?data_points:((data_points:number_data_point list) = [])
|
||||||
?aggregation_temporality:((aggregation_temporality:aggregation_temporality) = default_aggregation_temporality ())
|
?aggregation_temporality:((aggregation_temporality:aggregation_temporality) = default_aggregation_temporality ())
|
||||||
() : exponential_histogram = {
|
?is_monotonic:((is_monotonic:bool) = false)
|
||||||
|
() : sum = {
|
||||||
data_points;
|
data_points;
|
||||||
aggregation_temporality;
|
aggregation_temporality;
|
||||||
|
is_monotonic;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec default_histogram_data_point
|
let rec default_histogram_data_point
|
||||||
|
|
@ -272,47 +226,93 @@ let rec default_histogram
|
||||||
aggregation_temporality;
|
aggregation_temporality;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec default_number_data_point_value () : number_data_point_value = As_int (0L)
|
let rec default_exponential_histogram_data_point_buckets
|
||||||
|
?offset:((offset:int32) = 0l)
|
||||||
|
?bucket_counts:((bucket_counts:int64 list) = [])
|
||||||
|
() : exponential_histogram_data_point_buckets = {
|
||||||
|
offset;
|
||||||
|
bucket_counts;
|
||||||
|
}
|
||||||
|
|
||||||
and default_number_data_point
|
let rec default_exponential_histogram_data_point
|
||||||
?attributes:((attributes:Common_types.key_value list) = [])
|
?attributes:((attributes:Common_types.key_value list) = [])
|
||||||
?start_time_unix_nano:((start_time_unix_nano:int64) = 0L)
|
?start_time_unix_nano:((start_time_unix_nano:int64) = 0L)
|
||||||
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
||||||
?value:((value:number_data_point_value) = As_int (0L))
|
?count:((count:int64) = 0L)
|
||||||
?exemplars:((exemplars:exemplar list) = [])
|
?sum:((sum:float option) = None)
|
||||||
|
?scale:((scale:int32) = 0l)
|
||||||
|
?zero_count:((zero_count:int64) = 0L)
|
||||||
|
?positive:((positive:exponential_histogram_data_point_buckets option) = None)
|
||||||
|
?negative:((negative:exponential_histogram_data_point_buckets option) = None)
|
||||||
?flags:((flags:int32) = 0l)
|
?flags:((flags:int32) = 0l)
|
||||||
() : number_data_point = {
|
?exemplars:((exemplars:exemplar list) = [])
|
||||||
|
?min:((min:float option) = None)
|
||||||
|
?max:((max:float option) = None)
|
||||||
|
?zero_threshold:((zero_threshold:float) = 0.)
|
||||||
|
() : exponential_histogram_data_point = {
|
||||||
attributes;
|
attributes;
|
||||||
start_time_unix_nano;
|
start_time_unix_nano;
|
||||||
time_unix_nano;
|
time_unix_nano;
|
||||||
value;
|
count;
|
||||||
|
sum;
|
||||||
|
scale;
|
||||||
|
zero_count;
|
||||||
|
positive;
|
||||||
|
negative;
|
||||||
|
flags;
|
||||||
exemplars;
|
exemplars;
|
||||||
|
min;
|
||||||
|
max;
|
||||||
|
zero_threshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rec default_exponential_histogram
|
||||||
|
?data_points:((data_points:exponential_histogram_data_point list) = [])
|
||||||
|
?aggregation_temporality:((aggregation_temporality:aggregation_temporality) = default_aggregation_temporality ())
|
||||||
|
() : exponential_histogram = {
|
||||||
|
data_points;
|
||||||
|
aggregation_temporality;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rec default_summary_data_point_value_at_quantile
|
||||||
|
?quantile:((quantile:float) = 0.)
|
||||||
|
?value:((value:float) = 0.)
|
||||||
|
() : summary_data_point_value_at_quantile = {
|
||||||
|
quantile;
|
||||||
|
value;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rec default_summary_data_point
|
||||||
|
?attributes:((attributes:Common_types.key_value list) = [])
|
||||||
|
?start_time_unix_nano:((start_time_unix_nano:int64) = 0L)
|
||||||
|
?time_unix_nano:((time_unix_nano:int64) = 0L)
|
||||||
|
?count:((count:int64) = 0L)
|
||||||
|
?sum:((sum:float) = 0.)
|
||||||
|
?quantile_values:((quantile_values:summary_data_point_value_at_quantile list) = [])
|
||||||
|
?flags:((flags:int32) = 0l)
|
||||||
|
() : summary_data_point = {
|
||||||
|
attributes;
|
||||||
|
start_time_unix_nano;
|
||||||
|
time_unix_nano;
|
||||||
|
count;
|
||||||
|
sum;
|
||||||
|
quantile_values;
|
||||||
flags;
|
flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec default_sum
|
let rec default_summary
|
||||||
?data_points:((data_points:number_data_point list) = [])
|
?data_points:((data_points:summary_data_point list) = [])
|
||||||
?aggregation_temporality:((aggregation_temporality:aggregation_temporality) = default_aggregation_temporality ())
|
() : summary = {
|
||||||
?is_monotonic:((is_monotonic:bool) = false)
|
|
||||||
() : sum = {
|
|
||||||
data_points;
|
|
||||||
aggregation_temporality;
|
|
||||||
is_monotonic;
|
|
||||||
}
|
|
||||||
|
|
||||||
let rec default_gauge
|
|
||||||
?data_points:((data_points:number_data_point list) = [])
|
|
||||||
() : gauge = {
|
|
||||||
data_points;
|
data_points;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec default_metric_data () : metric_data = Summary (default_summary ())
|
let rec default_metric_data () : metric_data = Gauge (default_gauge ())
|
||||||
|
|
||||||
and default_metric
|
and default_metric
|
||||||
?name:((name:string) = "")
|
?name:((name:string) = "")
|
||||||
?description:((description:string) = "")
|
?description:((description:string) = "")
|
||||||
?unit_:((unit_:string) = "")
|
?unit_:((unit_:string) = "")
|
||||||
?data:((data:metric_data) = Summary (default_summary ()))
|
?data:((data:metric_data) = Gauge (default_gauge ()))
|
||||||
() : metric = {
|
() : metric = {
|
||||||
name;
|
name;
|
||||||
description;
|
description;
|
||||||
|
|
|
||||||
|
|
@ -4,33 +4,9 @@
|
||||||
|
|
||||||
(** {2 Types} *)
|
(** {2 Types} *)
|
||||||
|
|
||||||
type summary_data_point_value_at_quantile = {
|
|
||||||
quantile : float;
|
|
||||||
value : float;
|
|
||||||
}
|
|
||||||
|
|
||||||
type summary_data_point = {
|
|
||||||
attributes : Common_types.key_value list;
|
|
||||||
start_time_unix_nano : int64;
|
|
||||||
time_unix_nano : int64;
|
|
||||||
count : int64;
|
|
||||||
sum : float;
|
|
||||||
quantile_values : summary_data_point_value_at_quantile list;
|
|
||||||
flags : int32;
|
|
||||||
}
|
|
||||||
|
|
||||||
type summary = {
|
|
||||||
data_points : summary_data_point list;
|
|
||||||
}
|
|
||||||
|
|
||||||
type exponential_histogram_data_point_buckets = {
|
|
||||||
offset : int32;
|
|
||||||
bucket_counts : int64 list;
|
|
||||||
}
|
|
||||||
|
|
||||||
type exemplar_value =
|
type exemplar_value =
|
||||||
| As_int of int64
|
|
||||||
| As_double of float
|
| As_double of float
|
||||||
|
| As_int of int64
|
||||||
|
|
||||||
and exemplar = {
|
and exemplar = {
|
||||||
filtered_attributes : Common_types.key_value list;
|
filtered_attributes : Common_types.key_value list;
|
||||||
|
|
@ -40,21 +16,21 @@ and exemplar = {
|
||||||
trace_id : bytes;
|
trace_id : bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram_data_point = {
|
type number_data_point_value =
|
||||||
|
| As_double of float
|
||||||
|
| As_int of int64
|
||||||
|
|
||||||
|
and number_data_point = {
|
||||||
attributes : Common_types.key_value list;
|
attributes : Common_types.key_value list;
|
||||||
start_time_unix_nano : int64;
|
start_time_unix_nano : int64;
|
||||||
time_unix_nano : int64;
|
time_unix_nano : int64;
|
||||||
count : int64;
|
value : number_data_point_value;
|
||||||
sum : float option;
|
|
||||||
scale : int32;
|
|
||||||
zero_count : int64;
|
|
||||||
positive : exponential_histogram_data_point_buckets option;
|
|
||||||
negative : exponential_histogram_data_point_buckets option;
|
|
||||||
flags : int32;
|
|
||||||
exemplars : exemplar list;
|
exemplars : exemplar list;
|
||||||
min : float option;
|
flags : int32;
|
||||||
max : float option;
|
}
|
||||||
zero_threshold : float;
|
|
||||||
|
type gauge = {
|
||||||
|
data_points : number_data_point list;
|
||||||
}
|
}
|
||||||
|
|
||||||
type aggregation_temporality =
|
type aggregation_temporality =
|
||||||
|
|
@ -62,9 +38,10 @@ type aggregation_temporality =
|
||||||
| Aggregation_temporality_delta
|
| Aggregation_temporality_delta
|
||||||
| Aggregation_temporality_cumulative
|
| Aggregation_temporality_cumulative
|
||||||
|
|
||||||
type exponential_histogram = {
|
type sum = {
|
||||||
data_points : exponential_histogram_data_point list;
|
data_points : number_data_point list;
|
||||||
aggregation_temporality : aggregation_temporality;
|
aggregation_temporality : aggregation_temporality;
|
||||||
|
is_monotonic : bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
type histogram_data_point = {
|
type histogram_data_point = {
|
||||||
|
|
@ -86,35 +63,58 @@ type histogram = {
|
||||||
aggregation_temporality : aggregation_temporality;
|
aggregation_temporality : aggregation_temporality;
|
||||||
}
|
}
|
||||||
|
|
||||||
type number_data_point_value =
|
type exponential_histogram_data_point_buckets = {
|
||||||
| As_int of int64
|
offset : int32;
|
||||||
| As_double of float
|
bucket_counts : int64 list;
|
||||||
|
}
|
||||||
|
|
||||||
and number_data_point = {
|
type exponential_histogram_data_point = {
|
||||||
attributes : Common_types.key_value list;
|
attributes : Common_types.key_value list;
|
||||||
start_time_unix_nano : int64;
|
start_time_unix_nano : int64;
|
||||||
time_unix_nano : int64;
|
time_unix_nano : int64;
|
||||||
value : number_data_point_value;
|
count : int64;
|
||||||
|
sum : float option;
|
||||||
|
scale : int32;
|
||||||
|
zero_count : int64;
|
||||||
|
positive : exponential_histogram_data_point_buckets option;
|
||||||
|
negative : exponential_histogram_data_point_buckets option;
|
||||||
|
flags : int32;
|
||||||
exemplars : exemplar list;
|
exemplars : exemplar list;
|
||||||
|
min : float option;
|
||||||
|
max : float option;
|
||||||
|
zero_threshold : float;
|
||||||
|
}
|
||||||
|
|
||||||
|
type exponential_histogram = {
|
||||||
|
data_points : exponential_histogram_data_point list;
|
||||||
|
aggregation_temporality : aggregation_temporality;
|
||||||
|
}
|
||||||
|
|
||||||
|
type summary_data_point_value_at_quantile = {
|
||||||
|
quantile : float;
|
||||||
|
value : float;
|
||||||
|
}
|
||||||
|
|
||||||
|
type summary_data_point = {
|
||||||
|
attributes : Common_types.key_value list;
|
||||||
|
start_time_unix_nano : int64;
|
||||||
|
time_unix_nano : int64;
|
||||||
|
count : int64;
|
||||||
|
sum : float;
|
||||||
|
quantile_values : summary_data_point_value_at_quantile list;
|
||||||
flags : int32;
|
flags : int32;
|
||||||
}
|
}
|
||||||
|
|
||||||
type sum = {
|
type summary = {
|
||||||
data_points : number_data_point list;
|
data_points : summary_data_point list;
|
||||||
aggregation_temporality : aggregation_temporality;
|
|
||||||
is_monotonic : bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
type gauge = {
|
|
||||||
data_points : number_data_point list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type metric_data =
|
type metric_data =
|
||||||
| Summary of summary
|
|
||||||
| Exponential_histogram of exponential_histogram
|
|
||||||
| Histogram of histogram
|
|
||||||
| Sum of sum
|
|
||||||
| Gauge of gauge
|
| Gauge of gauge
|
||||||
|
| Sum of sum
|
||||||
|
| Histogram of histogram
|
||||||
|
| Exponential_histogram of exponential_histogram
|
||||||
|
| Summary of summary
|
||||||
|
|
||||||
and metric = {
|
and metric = {
|
||||||
name : string;
|
name : string;
|
||||||
|
|
@ -146,38 +146,6 @@ type data_point_flags =
|
||||||
|
|
||||||
(** {2 Default values} *)
|
(** {2 Default values} *)
|
||||||
|
|
||||||
val default_summary_data_point_value_at_quantile :
|
|
||||||
?quantile:float ->
|
|
||||||
?value:float ->
|
|
||||||
unit ->
|
|
||||||
summary_data_point_value_at_quantile
|
|
||||||
(** [default_summary_data_point_value_at_quantile ()] is the default value for type [summary_data_point_value_at_quantile] *)
|
|
||||||
|
|
||||||
val default_summary_data_point :
|
|
||||||
?attributes:Common_types.key_value list ->
|
|
||||||
?start_time_unix_nano:int64 ->
|
|
||||||
?time_unix_nano:int64 ->
|
|
||||||
?count:int64 ->
|
|
||||||
?sum:float ->
|
|
||||||
?quantile_values:summary_data_point_value_at_quantile list ->
|
|
||||||
?flags:int32 ->
|
|
||||||
unit ->
|
|
||||||
summary_data_point
|
|
||||||
(** [default_summary_data_point ()] is the default value for type [summary_data_point] *)
|
|
||||||
|
|
||||||
val default_summary :
|
|
||||||
?data_points:summary_data_point list ->
|
|
||||||
unit ->
|
|
||||||
summary
|
|
||||||
(** [default_summary ()] is the default value for type [summary] *)
|
|
||||||
|
|
||||||
val default_exponential_histogram_data_point_buckets :
|
|
||||||
?offset:int32 ->
|
|
||||||
?bucket_counts:int64 list ->
|
|
||||||
unit ->
|
|
||||||
exponential_histogram_data_point_buckets
|
|
||||||
(** [default_exponential_histogram_data_point_buckets ()] is the default value for type [exponential_histogram_data_point_buckets] *)
|
|
||||||
|
|
||||||
val default_exemplar_value : unit -> exemplar_value
|
val default_exemplar_value : unit -> exemplar_value
|
||||||
(** [default_exemplar_value ()] is the default value for type [exemplar_value] *)
|
(** [default_exemplar_value ()] is the default value for type [exemplar_value] *)
|
||||||
|
|
||||||
|
|
@ -191,34 +159,36 @@ val default_exemplar :
|
||||||
exemplar
|
exemplar
|
||||||
(** [default_exemplar ()] is the default value for type [exemplar] *)
|
(** [default_exemplar ()] is the default value for type [exemplar] *)
|
||||||
|
|
||||||
val default_exponential_histogram_data_point :
|
val default_number_data_point_value : unit -> number_data_point_value
|
||||||
|
(** [default_number_data_point_value ()] is the default value for type [number_data_point_value] *)
|
||||||
|
|
||||||
|
val default_number_data_point :
|
||||||
?attributes:Common_types.key_value list ->
|
?attributes:Common_types.key_value list ->
|
||||||
?start_time_unix_nano:int64 ->
|
?start_time_unix_nano:int64 ->
|
||||||
?time_unix_nano:int64 ->
|
?time_unix_nano:int64 ->
|
||||||
?count:int64 ->
|
?value:number_data_point_value ->
|
||||||
?sum:float option ->
|
|
||||||
?scale:int32 ->
|
|
||||||
?zero_count:int64 ->
|
|
||||||
?positive:exponential_histogram_data_point_buckets option ->
|
|
||||||
?negative:exponential_histogram_data_point_buckets option ->
|
|
||||||
?flags:int32 ->
|
|
||||||
?exemplars:exemplar list ->
|
?exemplars:exemplar list ->
|
||||||
?min:float option ->
|
?flags:int32 ->
|
||||||
?max:float option ->
|
|
||||||
?zero_threshold:float ->
|
|
||||||
unit ->
|
unit ->
|
||||||
exponential_histogram_data_point
|
number_data_point
|
||||||
(** [default_exponential_histogram_data_point ()] is the default value for type [exponential_histogram_data_point] *)
|
(** [default_number_data_point ()] is the default value for type [number_data_point] *)
|
||||||
|
|
||||||
|
val default_gauge :
|
||||||
|
?data_points:number_data_point list ->
|
||||||
|
unit ->
|
||||||
|
gauge
|
||||||
|
(** [default_gauge ()] is the default value for type [gauge] *)
|
||||||
|
|
||||||
val default_aggregation_temporality : unit -> aggregation_temporality
|
val default_aggregation_temporality : unit -> aggregation_temporality
|
||||||
(** [default_aggregation_temporality ()] is the default value for type [aggregation_temporality] *)
|
(** [default_aggregation_temporality ()] is the default value for type [aggregation_temporality] *)
|
||||||
|
|
||||||
val default_exponential_histogram :
|
val default_sum :
|
||||||
?data_points:exponential_histogram_data_point list ->
|
?data_points:number_data_point list ->
|
||||||
?aggregation_temporality:aggregation_temporality ->
|
?aggregation_temporality:aggregation_temporality ->
|
||||||
|
?is_monotonic:bool ->
|
||||||
unit ->
|
unit ->
|
||||||
exponential_histogram
|
sum
|
||||||
(** [default_exponential_histogram ()] is the default value for type [exponential_histogram] *)
|
(** [default_sum ()] is the default value for type [sum] *)
|
||||||
|
|
||||||
val default_histogram_data_point :
|
val default_histogram_data_point :
|
||||||
?attributes:Common_types.key_value list ->
|
?attributes:Common_types.key_value list ->
|
||||||
|
|
@ -243,33 +213,63 @@ val default_histogram :
|
||||||
histogram
|
histogram
|
||||||
(** [default_histogram ()] is the default value for type [histogram] *)
|
(** [default_histogram ()] is the default value for type [histogram] *)
|
||||||
|
|
||||||
val default_number_data_point_value : unit -> number_data_point_value
|
val default_exponential_histogram_data_point_buckets :
|
||||||
(** [default_number_data_point_value ()] is the default value for type [number_data_point_value] *)
|
?offset:int32 ->
|
||||||
|
?bucket_counts:int64 list ->
|
||||||
|
unit ->
|
||||||
|
exponential_histogram_data_point_buckets
|
||||||
|
(** [default_exponential_histogram_data_point_buckets ()] is the default value for type [exponential_histogram_data_point_buckets] *)
|
||||||
|
|
||||||
val default_number_data_point :
|
val default_exponential_histogram_data_point :
|
||||||
?attributes:Common_types.key_value list ->
|
?attributes:Common_types.key_value list ->
|
||||||
?start_time_unix_nano:int64 ->
|
?start_time_unix_nano:int64 ->
|
||||||
?time_unix_nano:int64 ->
|
?time_unix_nano:int64 ->
|
||||||
?value:number_data_point_value ->
|
?count:int64 ->
|
||||||
|
?sum:float option ->
|
||||||
|
?scale:int32 ->
|
||||||
|
?zero_count:int64 ->
|
||||||
|
?positive:exponential_histogram_data_point_buckets option ->
|
||||||
|
?negative:exponential_histogram_data_point_buckets option ->
|
||||||
|
?flags:int32 ->
|
||||||
?exemplars:exemplar list ->
|
?exemplars:exemplar list ->
|
||||||
|
?min:float option ->
|
||||||
|
?max:float option ->
|
||||||
|
?zero_threshold:float ->
|
||||||
|
unit ->
|
||||||
|
exponential_histogram_data_point
|
||||||
|
(** [default_exponential_histogram_data_point ()] is the default value for type [exponential_histogram_data_point] *)
|
||||||
|
|
||||||
|
val default_exponential_histogram :
|
||||||
|
?data_points:exponential_histogram_data_point list ->
|
||||||
|
?aggregation_temporality:aggregation_temporality ->
|
||||||
|
unit ->
|
||||||
|
exponential_histogram
|
||||||
|
(** [default_exponential_histogram ()] is the default value for type [exponential_histogram] *)
|
||||||
|
|
||||||
|
val default_summary_data_point_value_at_quantile :
|
||||||
|
?quantile:float ->
|
||||||
|
?value:float ->
|
||||||
|
unit ->
|
||||||
|
summary_data_point_value_at_quantile
|
||||||
|
(** [default_summary_data_point_value_at_quantile ()] is the default value for type [summary_data_point_value_at_quantile] *)
|
||||||
|
|
||||||
|
val default_summary_data_point :
|
||||||
|
?attributes:Common_types.key_value list ->
|
||||||
|
?start_time_unix_nano:int64 ->
|
||||||
|
?time_unix_nano:int64 ->
|
||||||
|
?count:int64 ->
|
||||||
|
?sum:float ->
|
||||||
|
?quantile_values:summary_data_point_value_at_quantile list ->
|
||||||
?flags:int32 ->
|
?flags:int32 ->
|
||||||
unit ->
|
unit ->
|
||||||
number_data_point
|
summary_data_point
|
||||||
(** [default_number_data_point ()] is the default value for type [number_data_point] *)
|
(** [default_summary_data_point ()] is the default value for type [summary_data_point] *)
|
||||||
|
|
||||||
val default_sum :
|
val default_summary :
|
||||||
?data_points:number_data_point list ->
|
?data_points:summary_data_point list ->
|
||||||
?aggregation_temporality:aggregation_temporality ->
|
|
||||||
?is_monotonic:bool ->
|
|
||||||
unit ->
|
unit ->
|
||||||
sum
|
summary
|
||||||
(** [default_sum ()] is the default value for type [sum] *)
|
(** [default_summary ()] is the default value for type [summary] *)
|
||||||
|
|
||||||
val default_gauge :
|
|
||||||
?data_points:number_data_point list ->
|
|
||||||
unit ->
|
|
||||||
gauge
|
|
||||||
(** [default_gauge ()] is the default value for type [gauge] *)
|
|
||||||
|
|
||||||
val default_metric_data : unit -> metric_data
|
val default_metric_data : unit -> metric_data
|
||||||
(** [default_metric_data ()] is the default value for type [metric_data] *)
|
(** [default_metric_data ()] is the default value for type [metric_data] *)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** resource.proto Pretty Printing *)
|
(** resource.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** status.proto Pretty Printing *)
|
(** status.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** trace.proto Pretty Printing *)
|
(** trace.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(** trace_service.proto Pretty Printing *)
|
(** trace_service.proto Pretty Printing *)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue