mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -04:00
update generated code again, repeated fields are optional again
This commit is contained in:
parent
e2c545d106
commit
d4b44244d7
19 changed files with 201 additions and 268 deletions
|
|
@ -696,8 +696,7 @@ module Globals = struct
|
||||||
let service_version = ref None
|
let service_version = ref None
|
||||||
|
|
||||||
let instrumentation_library : instrumentation_scope =
|
let instrumentation_library : instrumentation_scope =
|
||||||
make_instrumentation_scope ~version:"%%VERSION_NUM%%" ~name:"ocaml-otel"
|
make_instrumentation_scope ~version:"%%VERSION_NUM%%" ~name:"ocaml-otel" ()
|
||||||
~attributes:[] ()
|
|
||||||
|
|
||||||
(** Global attributes, initially set via OTEL_RESOURCE_ATTRIBUTES and
|
(** Global attributes, initially set via OTEL_RESOURCE_ATTRIBUTES and
|
||||||
modifiable by the user code. They will be attached to each outgoing
|
modifiable by the user code. They will be attached to each outgoing
|
||||||
|
|
@ -1223,9 +1222,7 @@ module Trace = struct
|
||||||
make_scope_spans ~scope:Globals.instrumentation_library ~spans ()
|
make_scope_spans ~scope:Globals.instrumentation_library ~spans ()
|
||||||
in
|
in
|
||||||
let attributes = Globals.mk_attributes ?service_name ?attrs () in
|
let attributes = Globals.mk_attributes ?service_name ?attrs () in
|
||||||
let resource =
|
let resource = Proto.Resource.make_resource ~attributes () in
|
||||||
Proto.Resource.make_resource ~entity_refs:[] ~attributes ()
|
|
||||||
in
|
|
||||||
make_resource_spans ~resource ~scope_spans:[ ils ] ()
|
make_resource_spans ~resource ~scope_spans:[ ils ] ()
|
||||||
|
|
||||||
(** Sync emitter.
|
(** Sync emitter.
|
||||||
|
|
@ -1375,7 +1372,7 @@ module Metrics = struct
|
||||||
number_data_point =
|
number_data_point =
|
||||||
let attributes = attrs |> List.map _conv_key_value in
|
let attributes = attrs |> List.map _conv_key_value in
|
||||||
make_number_data_point ~start_time_unix_nano ~time_unix_nano:now ~attributes
|
make_number_data_point ~start_time_unix_nano ~time_unix_nano:now ~attributes
|
||||||
~value:(As_double d) ~exemplars:[] ()
|
~value:(As_double d) ()
|
||||||
|
|
||||||
(** Number data point, as an int *)
|
(** Number data point, as an int *)
|
||||||
let int ?(start_time_unix_nano = _program_start)
|
let int ?(start_time_unix_nano = _program_start)
|
||||||
|
|
@ -1384,12 +1381,12 @@ module Metrics = struct
|
||||||
let attributes = attrs |> List.map _conv_key_value in
|
let attributes = attrs |> List.map _conv_key_value in
|
||||||
make_number_data_point ~start_time_unix_nano ~time_unix_nano:now ~attributes
|
make_number_data_point ~start_time_unix_nano ~time_unix_nano:now ~attributes
|
||||||
~value:(As_int (Int64.of_int i))
|
~value:(As_int (Int64.of_int i))
|
||||||
~exemplars:[] ()
|
()
|
||||||
|
|
||||||
(** Aggregation of a scalar metric, always with the current value *)
|
(** Aggregation of a scalar metric, always with the current value *)
|
||||||
let gauge ~name ?description ?unit_ (l : number_data_point list) : t =
|
let gauge ~name ?description ?unit_ (l : number_data_point list) : t =
|
||||||
let data = Gauge (make_gauge ~data_points:l ()) in
|
let data = Gauge (make_gauge ~data_points:l ()) in
|
||||||
make_metric ~metadata:[] ~name ?description ?unit_ ~data ()
|
make_metric ~name ?description ?unit_ ~data ()
|
||||||
|
|
||||||
type aggregation_temporality = Metrics.aggregation_temporality =
|
type aggregation_temporality = Metrics.aggregation_temporality =
|
||||||
| Aggregation_temporality_unspecified
|
| Aggregation_temporality_unspecified
|
||||||
|
|
@ -1403,7 +1400,7 @@ module Metrics = struct
|
||||||
let data =
|
let data =
|
||||||
Sum (make_sum ~data_points:l ?is_monotonic ~aggregation_temporality ())
|
Sum (make_sum ~data_points:l ?is_monotonic ~aggregation_temporality ())
|
||||||
in
|
in
|
||||||
make_metric ~metadata:[] ~name ?description ?unit_ ~data ()
|
make_metric ~name ?description ?unit_ ~data ()
|
||||||
|
|
||||||
(** Histogram data
|
(** Histogram data
|
||||||
@param count number of values in population (non negative)
|
@param count number of values in population (non negative)
|
||||||
|
|
@ -1426,7 +1423,7 @@ module Metrics = struct
|
||||||
let data =
|
let data =
|
||||||
Histogram (make_histogram ~data_points:l ?aggregation_temporality ())
|
Histogram (make_histogram ~data_points:l ?aggregation_temporality ())
|
||||||
in
|
in
|
||||||
make_metric ~metadata:[] ~name ?description ?unit_ ~data ()
|
make_metric ~name ?description ?unit_ ~data ()
|
||||||
|
|
||||||
(* TODO: exponential history *)
|
(* TODO: exponential history *)
|
||||||
(* TODO: summary *)
|
(* TODO: summary *)
|
||||||
|
|
@ -1439,9 +1436,7 @@ module Metrics = struct
|
||||||
make_scope_metrics ~scope:Globals.instrumentation_library ~metrics:l ()
|
make_scope_metrics ~scope:Globals.instrumentation_library ~metrics:l ()
|
||||||
in
|
in
|
||||||
let attributes = Globals.mk_attributes ?service_name ?attrs () in
|
let attributes = Globals.mk_attributes ?service_name ?attrs () in
|
||||||
let resource =
|
let resource = Proto.Resource.make_resource ~attributes () in
|
||||||
Proto.Resource.make_resource ~entity_refs:[] ~attributes ()
|
|
||||||
in
|
|
||||||
make_resource_metrics ~scope_metrics:[ lm ] ~resource ()
|
make_resource_metrics ~scope_metrics:[ lm ] ~resource ()
|
||||||
|
|
||||||
(** Emit some metrics to the collector (sync). This blocks until the backend
|
(** Emit some metrics to the collector (sync). This blocks until the backend
|
||||||
|
|
@ -1546,7 +1541,7 @@ module Logs = struct
|
||||||
let trace_id = Option.map Trace_id.to_bytes trace_id in
|
let trace_id = Option.map Trace_id.to_bytes trace_id in
|
||||||
let span_id = Option.map Span_id.to_bytes span_id in
|
let span_id = Option.map Span_id.to_bytes span_id in
|
||||||
let body = _conv_value body in
|
let body = _conv_value body in
|
||||||
make_log_record ~time_unix_nano ~observed_time_unix_nano ~attributes:[]
|
make_log_record ~time_unix_nano ~observed_time_unix_nano
|
||||||
?severity_number:severity ?severity_text:log_level ?flags ?trace_id
|
?severity_number:severity ?severity_text:log_level ?flags ?trace_id
|
||||||
?span_id ?body ()
|
?span_id ?body ()
|
||||||
|
|
||||||
|
|
@ -1572,9 +1567,7 @@ module Logs = struct
|
||||||
cause deadlocks. *)
|
cause deadlocks. *)
|
||||||
let emit ?service_name ?attrs (l : t list) : unit =
|
let emit ?service_name ?attrs (l : t list) : unit =
|
||||||
let attributes = Globals.mk_attributes ?service_name ?attrs () in
|
let attributes = Globals.mk_attributes ?service_name ?attrs () in
|
||||||
let resource =
|
let resource = Proto.Resource.make_resource ~attributes () in
|
||||||
Proto.Resource.make_resource ~entity_refs:[] ~attributes ()
|
|
||||||
in
|
|
||||||
let ll =
|
let ll =
|
||||||
make_scope_logs ~scope:Globals.instrumentation_library ~log_records:l ()
|
make_scope_logs ~scope:Globals.instrumentation_library ~log_records:l ()
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,13 @@ and key_value_list = {
|
||||||
}
|
}
|
||||||
|
|
||||||
and key_value = {
|
and key_value = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable key : string;
|
mutable key : string;
|
||||||
mutable value : any_value option;
|
mutable value : any_value option;
|
||||||
}
|
}
|
||||||
|
|
||||||
type instrumentation_scope = {
|
type instrumentation_scope = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable name : string;
|
mutable name : string;
|
||||||
mutable version : string;
|
mutable version : string;
|
||||||
mutable attributes : key_value list;
|
mutable attributes : key_value list;
|
||||||
|
|
@ -34,8 +32,7 @@ type instrumentation_scope = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type entity_ref = {
|
type entity_ref = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
mutable type_ : string;
|
mutable type_ : string;
|
||||||
mutable id_keys : string list;
|
mutable id_keys : string list;
|
||||||
|
|
@ -91,7 +88,7 @@ let copy_array_value (self:array_value) : array_value =
|
||||||
{ self with values = self.values }
|
{ self with values = self.values }
|
||||||
|
|
||||||
let make_array_value
|
let make_array_value
|
||||||
~(values:any_value list)
|
?(values=[])
|
||||||
() : array_value =
|
() : array_value =
|
||||||
let _res = default_array_value () in
|
let _res = default_array_value () in
|
||||||
set_array_value_values _res values;
|
set_array_value_values _res values;
|
||||||
|
|
@ -105,7 +102,7 @@ let copy_key_value_list (self:key_value_list) : key_value_list =
|
||||||
{ self with values = self.values }
|
{ self with values = self.values }
|
||||||
|
|
||||||
let make_key_value_list
|
let make_key_value_list
|
||||||
~(values:key_value list)
|
?(values=[])
|
||||||
() : key_value_list =
|
() : key_value_list =
|
||||||
let _res = default_key_value_list () in
|
let _res = default_key_value_list () in
|
||||||
set_key_value_list_values _res values;
|
set_key_value_list_values _res values;
|
||||||
|
|
@ -153,7 +150,7 @@ let copy_instrumentation_scope (self:instrumentation_scope) : instrumentation_sc
|
||||||
let make_instrumentation_scope
|
let make_instrumentation_scope
|
||||||
?(name:string option)
|
?(name:string option)
|
||||||
?(version:string option)
|
?(version:string option)
|
||||||
~(attributes:key_value list)
|
?(attributes=[])
|
||||||
?(dropped_attributes_count:int32 option)
|
?(dropped_attributes_count:int32 option)
|
||||||
() : instrumentation_scope =
|
() : instrumentation_scope =
|
||||||
let _res = default_instrumentation_scope () in
|
let _res = default_instrumentation_scope () in
|
||||||
|
|
@ -187,8 +184,8 @@ let copy_entity_ref (self:entity_ref) : entity_ref =
|
||||||
let make_entity_ref
|
let make_entity_ref
|
||||||
?(schema_url:string option)
|
?(schema_url:string option)
|
||||||
?(type_:string option)
|
?(type_:string option)
|
||||||
~(id_keys:string list)
|
?(id_keys=[])
|
||||||
~(description_keys:string list)
|
?(description_keys=[])
|
||||||
() : entity_ref =
|
() : entity_ref =
|
||||||
let _res = default_entity_ref () in
|
let _res = default_entity_ref () in
|
||||||
(match schema_url with
|
(match schema_url with
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,13 @@ and key_value_list = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
and key_value = private {
|
and key_value = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable key : string;
|
mutable key : string;
|
||||||
mutable value : any_value option;
|
mutable value : any_value option;
|
||||||
}
|
}
|
||||||
|
|
||||||
type instrumentation_scope = private {
|
type instrumentation_scope = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable name : string;
|
mutable name : string;
|
||||||
mutable version : string;
|
mutable version : string;
|
||||||
mutable attributes : key_value list;
|
mutable attributes : key_value list;
|
||||||
|
|
@ -41,8 +39,7 @@ type instrumentation_scope = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type entity_ref = private {
|
type entity_ref = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
mutable type_ : string;
|
mutable type_ : string;
|
||||||
mutable id_keys : string list;
|
mutable id_keys : string list;
|
||||||
|
|
@ -75,7 +72,7 @@ val default_entity_ref : unit -> entity_ref
|
||||||
|
|
||||||
|
|
||||||
val make_array_value :
|
val make_array_value :
|
||||||
values:any_value list ->
|
?values:any_value list ->
|
||||||
unit ->
|
unit ->
|
||||||
array_value
|
array_value
|
||||||
(** [make_array_value … ()] is a builder for type [array_value] *)
|
(** [make_array_value … ()] is a builder for type [array_value] *)
|
||||||
|
|
@ -86,7 +83,7 @@ val set_array_value_values : array_value -> any_value list -> unit
|
||||||
(** set field values in array_value *)
|
(** set field values in array_value *)
|
||||||
|
|
||||||
val make_key_value_list :
|
val make_key_value_list :
|
||||||
values:key_value list ->
|
?values:key_value list ->
|
||||||
unit ->
|
unit ->
|
||||||
key_value_list
|
key_value_list
|
||||||
(** [make_key_value_list … ()] is a builder for type [key_value_list] *)
|
(** [make_key_value_list … ()] is a builder for type [key_value_list] *)
|
||||||
|
|
@ -117,7 +114,7 @@ val set_key_value_value : key_value -> any_value -> unit
|
||||||
val make_instrumentation_scope :
|
val make_instrumentation_scope :
|
||||||
?name:string ->
|
?name:string ->
|
||||||
?version:string ->
|
?version:string ->
|
||||||
attributes:key_value list ->
|
?attributes:key_value list ->
|
||||||
?dropped_attributes_count:int32 ->
|
?dropped_attributes_count:int32 ->
|
||||||
unit ->
|
unit ->
|
||||||
instrumentation_scope
|
instrumentation_scope
|
||||||
|
|
@ -149,8 +146,8 @@ val set_instrumentation_scope_dropped_attributes_count : instrumentation_scope -
|
||||||
val make_entity_ref :
|
val make_entity_ref :
|
||||||
?schema_url:string ->
|
?schema_url:string ->
|
||||||
?type_:string ->
|
?type_:string ->
|
||||||
id_keys:string list ->
|
?id_keys:string list ->
|
||||||
description_keys:string list ->
|
?description_keys:string list ->
|
||||||
unit ->
|
unit ->
|
||||||
entity_ref
|
entity_ref
|
||||||
(** [make_entity_ref … ()] is a builder for type [entity_ref] *)
|
(** [make_entity_ref … ()] is a builder for type [entity_ref] *)
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,7 @@ type severity_number =
|
||||||
| Severity_number_fatal4
|
| Severity_number_fatal4
|
||||||
|
|
||||||
type log_record = {
|
type log_record = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *)
|
||||||
(** tracking presence for 9 fields *)
|
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
mutable observed_time_unix_nano : int64;
|
mutable observed_time_unix_nano : int64;
|
||||||
mutable severity_number : severity_number;
|
mutable severity_number : severity_number;
|
||||||
|
|
@ -44,16 +43,14 @@ type log_record = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type scope_logs = {
|
type scope_logs = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable scope : Common.instrumentation_scope option;
|
mutable scope : Common.instrumentation_scope option;
|
||||||
mutable log_records : log_record list;
|
mutable log_records : log_record list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type resource_logs = {
|
type resource_logs = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable resource : Resource.resource option;
|
mutable resource : Resource.resource option;
|
||||||
mutable scope_logs : scope_logs list;
|
mutable scope_logs : scope_logs list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
|
|
@ -154,7 +151,7 @@ let make_log_record
|
||||||
?(severity_number:severity_number option)
|
?(severity_number:severity_number option)
|
||||||
?(severity_text:string option)
|
?(severity_text:string option)
|
||||||
?(body:Common.any_value option)
|
?(body:Common.any_value option)
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(dropped_attributes_count:int32 option)
|
?(dropped_attributes_count:int32 option)
|
||||||
?(flags:int32 option)
|
?(flags:int32 option)
|
||||||
?(trace_id:bytes option)
|
?(trace_id:bytes option)
|
||||||
|
|
@ -209,7 +206,7 @@ let copy_scope_logs (self:scope_logs) : scope_logs =
|
||||||
|
|
||||||
let make_scope_logs
|
let make_scope_logs
|
||||||
?(scope:Common.instrumentation_scope option)
|
?(scope:Common.instrumentation_scope option)
|
||||||
~(log_records:log_record list)
|
?(log_records=[])
|
||||||
?(schema_url:string option)
|
?(schema_url:string option)
|
||||||
() : scope_logs =
|
() : scope_logs =
|
||||||
let _res = default_scope_logs () in
|
let _res = default_scope_logs () in
|
||||||
|
|
@ -236,7 +233,7 @@ let copy_resource_logs (self:resource_logs) : resource_logs =
|
||||||
|
|
||||||
let make_resource_logs
|
let make_resource_logs
|
||||||
?(resource:Resource.resource option)
|
?(resource:Resource.resource option)
|
||||||
~(scope_logs:scope_logs list)
|
?(scope_logs=[])
|
||||||
?(schema_url:string option)
|
?(schema_url:string option)
|
||||||
() : resource_logs =
|
() : resource_logs =
|
||||||
let _res = default_resource_logs () in
|
let _res = default_resource_logs () in
|
||||||
|
|
@ -257,7 +254,7 @@ let copy_logs_data (self:logs_data) : logs_data =
|
||||||
{ self with resource_logs = self.resource_logs }
|
{ self with resource_logs = self.resource_logs }
|
||||||
|
|
||||||
let make_logs_data
|
let make_logs_data
|
||||||
~(resource_logs:resource_logs list)
|
?(resource_logs=[])
|
||||||
() : logs_data =
|
() : logs_data =
|
||||||
let _res = default_logs_data () in
|
let _res = default_logs_data () in
|
||||||
set_logs_data_resource_logs _res resource_logs;
|
set_logs_data_resource_logs _res resource_logs;
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@ type severity_number =
|
||||||
| Severity_number_fatal4
|
| Severity_number_fatal4
|
||||||
|
|
||||||
type log_record = private {
|
type log_record = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *)
|
||||||
(** tracking presence for 9 fields *)
|
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
mutable observed_time_unix_nano : int64;
|
mutable observed_time_unix_nano : int64;
|
||||||
mutable severity_number : severity_number;
|
mutable severity_number : severity_number;
|
||||||
|
|
@ -51,16 +50,14 @@ type log_record = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type scope_logs = private {
|
type scope_logs = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable scope : Common.instrumentation_scope option;
|
mutable scope : Common.instrumentation_scope option;
|
||||||
mutable log_records : log_record list;
|
mutable log_records : log_record list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type resource_logs = private {
|
type resource_logs = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable resource : Resource.resource option;
|
mutable resource : Resource.resource option;
|
||||||
mutable scope_logs : scope_logs list;
|
mutable scope_logs : scope_logs list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
|
|
@ -105,7 +102,7 @@ val make_log_record :
|
||||||
?severity_number:severity_number ->
|
?severity_number:severity_number ->
|
||||||
?severity_text:string ->
|
?severity_text:string ->
|
||||||
?body:Common.any_value ->
|
?body:Common.any_value ->
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?dropped_attributes_count:int32 ->
|
?dropped_attributes_count:int32 ->
|
||||||
?flags:int32 ->
|
?flags:int32 ->
|
||||||
?trace_id:bytes ->
|
?trace_id:bytes ->
|
||||||
|
|
@ -179,7 +176,7 @@ val set_log_record_event_name : log_record -> string -> unit
|
||||||
|
|
||||||
val make_scope_logs :
|
val make_scope_logs :
|
||||||
?scope:Common.instrumentation_scope ->
|
?scope:Common.instrumentation_scope ->
|
||||||
log_records:log_record list ->
|
?log_records:log_record list ->
|
||||||
?schema_url:string ->
|
?schema_url:string ->
|
||||||
unit ->
|
unit ->
|
||||||
scope_logs
|
scope_logs
|
||||||
|
|
@ -201,7 +198,7 @@ val set_scope_logs_schema_url : scope_logs -> string -> unit
|
||||||
|
|
||||||
val make_resource_logs :
|
val make_resource_logs :
|
||||||
?resource:Resource.resource ->
|
?resource:Resource.resource ->
|
||||||
scope_logs:scope_logs list ->
|
?scope_logs:scope_logs list ->
|
||||||
?schema_url:string ->
|
?schema_url:string ->
|
||||||
unit ->
|
unit ->
|
||||||
resource_logs
|
resource_logs
|
||||||
|
|
@ -222,7 +219,7 @@ val set_resource_logs_schema_url : resource_logs -> string -> unit
|
||||||
(** set field schema_url in resource_logs *)
|
(** set field schema_url in resource_logs *)
|
||||||
|
|
||||||
val make_logs_data :
|
val make_logs_data :
|
||||||
resource_logs:resource_logs list ->
|
?resource_logs:resource_logs list ->
|
||||||
unit ->
|
unit ->
|
||||||
logs_data
|
logs_data
|
||||||
(** [make_logs_data … ()] is a builder for type [logs_data] *)
|
(** [make_logs_data … ()] is a builder for type [logs_data] *)
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ type export_logs_service_request = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type export_logs_partial_success = {
|
type export_logs_partial_success = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable rejected_log_records : int64;
|
mutable rejected_log_records : int64;
|
||||||
mutable error_message : string;
|
mutable error_message : string;
|
||||||
}
|
}
|
||||||
|
|
@ -43,7 +42,7 @@ let copy_export_logs_service_request (self:export_logs_service_request) : export
|
||||||
{ self with resource_logs = self.resource_logs }
|
{ self with resource_logs = self.resource_logs }
|
||||||
|
|
||||||
let make_export_logs_service_request
|
let make_export_logs_service_request
|
||||||
~(resource_logs:Logs.resource_logs list)
|
?(resource_logs=[])
|
||||||
() : export_logs_service_request =
|
() : export_logs_service_request =
|
||||||
let _res = default_export_logs_service_request () in
|
let _res = default_export_logs_service_request () in
|
||||||
set_export_logs_service_request_resource_logs _res resource_logs;
|
set_export_logs_service_request_resource_logs _res resource_logs;
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ type export_logs_service_request = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type export_logs_partial_success = private {
|
type export_logs_partial_success = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable rejected_log_records : int64;
|
mutable rejected_log_records : int64;
|
||||||
mutable error_message : string;
|
mutable error_message : string;
|
||||||
}
|
}
|
||||||
|
|
@ -38,7 +37,7 @@ val default_export_logs_service_response : unit -> export_logs_service_response
|
||||||
(** {2 Make functions} *)
|
(** {2 Make functions} *)
|
||||||
|
|
||||||
val make_export_logs_service_request :
|
val make_export_logs_service_request :
|
||||||
resource_logs:Logs.resource_logs list ->
|
?resource_logs:Logs.resource_logs list ->
|
||||||
unit ->
|
unit ->
|
||||||
export_logs_service_request
|
export_logs_service_request
|
||||||
(** [make_export_logs_service_request … ()] is a builder for type [export_logs_service_request] *)
|
(** [make_export_logs_service_request … ()] is a builder for type [export_logs_service_request] *)
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ type exemplar_value =
|
||||||
| As_int of int64
|
| As_int of int64
|
||||||
|
|
||||||
and exemplar = {
|
and exemplar = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable filtered_attributes : Common.key_value list;
|
mutable filtered_attributes : Common.key_value list;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
mutable value : exemplar_value option;
|
mutable value : exemplar_value option;
|
||||||
|
|
@ -19,8 +18,7 @@ type number_data_point_value =
|
||||||
| As_int of int64
|
| As_int of int64
|
||||||
|
|
||||||
and number_data_point = {
|
and number_data_point = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -39,16 +37,14 @@ type aggregation_temporality =
|
||||||
| Aggregation_temporality_cumulative
|
| Aggregation_temporality_cumulative
|
||||||
|
|
||||||
type sum = {
|
type sum = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable data_points : number_data_point list;
|
mutable data_points : number_data_point list;
|
||||||
mutable aggregation_temporality : aggregation_temporality;
|
mutable aggregation_temporality : aggregation_temporality;
|
||||||
mutable is_monotonic : bool;
|
mutable is_monotonic : bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
type histogram_data_point = {
|
type histogram_data_point = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *)
|
||||||
(** tracking presence for 4 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -63,22 +59,19 @@ type histogram_data_point = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type histogram = {
|
type histogram = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable data_points : histogram_data_point list;
|
mutable data_points : histogram_data_point list;
|
||||||
mutable aggregation_temporality : aggregation_temporality;
|
mutable aggregation_temporality : aggregation_temporality;
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram_data_point_buckets = {
|
type exponential_histogram_data_point_buckets = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable offset : int32;
|
mutable offset : int32;
|
||||||
mutable bucket_counts : int64 list;
|
mutable bucket_counts : int64 list;
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram_data_point = {
|
type exponential_histogram_data_point = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *)
|
||||||
(** tracking presence for 7 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -96,22 +89,19 @@ type exponential_histogram_data_point = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram = {
|
type exponential_histogram = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable data_points : exponential_histogram_data_point list;
|
mutable data_points : exponential_histogram_data_point list;
|
||||||
mutable aggregation_temporality : aggregation_temporality;
|
mutable aggregation_temporality : aggregation_temporality;
|
||||||
}
|
}
|
||||||
|
|
||||||
type summary_data_point_value_at_quantile = {
|
type summary_data_point_value_at_quantile = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable quantile : float;
|
mutable quantile : float;
|
||||||
mutable value : float;
|
mutable value : float;
|
||||||
}
|
}
|
||||||
|
|
||||||
type summary_data_point = {
|
type summary_data_point = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *)
|
||||||
(** tracking presence for 5 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -133,8 +123,7 @@ type metric_data =
|
||||||
| Summary of summary
|
| Summary of summary
|
||||||
|
|
||||||
and metric = {
|
and metric = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable name : string;
|
mutable name : string;
|
||||||
mutable description : string;
|
mutable description : string;
|
||||||
mutable unit_ : string;
|
mutable unit_ : string;
|
||||||
|
|
@ -143,16 +132,14 @@ and metric = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type scope_metrics = {
|
type scope_metrics = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable scope : Common.instrumentation_scope option;
|
mutable scope : Common.instrumentation_scope option;
|
||||||
mutable metrics : metric list;
|
mutable metrics : metric list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type resource_metrics = {
|
type resource_metrics = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable resource : Resource.resource option;
|
mutable resource : Resource.resource option;
|
||||||
mutable scope_metrics : scope_metrics list;
|
mutable scope_metrics : scope_metrics list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
|
|
@ -344,7 +331,7 @@ let copy_exemplar (self:exemplar) : exemplar =
|
||||||
{ self with filtered_attributes = self.filtered_attributes }
|
{ self with filtered_attributes = self.filtered_attributes }
|
||||||
|
|
||||||
let make_exemplar
|
let make_exemplar
|
||||||
~(filtered_attributes:Common.key_value list)
|
?(filtered_attributes=[])
|
||||||
?(time_unix_nano:int64 option)
|
?(time_unix_nano:int64 option)
|
||||||
?(value:exemplar_value option)
|
?(value:exemplar_value option)
|
||||||
?(span_id:bytes option)
|
?(span_id:bytes option)
|
||||||
|
|
@ -388,11 +375,11 @@ let copy_number_data_point (self:number_data_point) : number_data_point =
|
||||||
{ self with attributes = self.attributes }
|
{ self with attributes = self.attributes }
|
||||||
|
|
||||||
let make_number_data_point
|
let make_number_data_point
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(start_time_unix_nano:int64 option)
|
?(start_time_unix_nano:int64 option)
|
||||||
?(time_unix_nano:int64 option)
|
?(time_unix_nano:int64 option)
|
||||||
?(value:number_data_point_value option)
|
?(value:number_data_point_value option)
|
||||||
~(exemplars:exemplar list)
|
?(exemplars=[])
|
||||||
?(flags:int32 option)
|
?(flags:int32 option)
|
||||||
() : number_data_point =
|
() : number_data_point =
|
||||||
let _res = default_number_data_point () in
|
let _res = default_number_data_point () in
|
||||||
|
|
@ -420,7 +407,7 @@ let copy_gauge (self:gauge) : gauge =
|
||||||
{ self with data_points = self.data_points }
|
{ self with data_points = self.data_points }
|
||||||
|
|
||||||
let make_gauge
|
let make_gauge
|
||||||
~(data_points:number_data_point list)
|
?(data_points=[])
|
||||||
() : gauge =
|
() : gauge =
|
||||||
let _res = default_gauge () in
|
let _res = default_gauge () in
|
||||||
set_gauge_data_points _res data_points;
|
set_gauge_data_points _res data_points;
|
||||||
|
|
@ -441,7 +428,7 @@ let copy_sum (self:sum) : sum =
|
||||||
{ self with data_points = self.data_points }
|
{ self with data_points = self.data_points }
|
||||||
|
|
||||||
let make_sum
|
let make_sum
|
||||||
~(data_points:number_data_point list)
|
?(data_points=[])
|
||||||
?(aggregation_temporality:aggregation_temporality option)
|
?(aggregation_temporality:aggregation_temporality option)
|
||||||
?(is_monotonic:bool option)
|
?(is_monotonic:bool option)
|
||||||
() : sum =
|
() : sum =
|
||||||
|
|
@ -487,14 +474,14 @@ let copy_histogram_data_point (self:histogram_data_point) : histogram_data_point
|
||||||
{ self with attributes = self.attributes }
|
{ self with attributes = self.attributes }
|
||||||
|
|
||||||
let make_histogram_data_point
|
let make_histogram_data_point
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(start_time_unix_nano:int64 option)
|
?(start_time_unix_nano:int64 option)
|
||||||
?(time_unix_nano:int64 option)
|
?(time_unix_nano:int64 option)
|
||||||
?(count:int64 option)
|
?(count:int64 option)
|
||||||
?(sum:float option)
|
?(sum:float option)
|
||||||
~(bucket_counts:int64 list)
|
?(bucket_counts=[])
|
||||||
~(explicit_bounds:float list)
|
?(explicit_bounds=[])
|
||||||
~(exemplars:exemplar list)
|
?(exemplars=[])
|
||||||
?(flags:int32 option)
|
?(flags:int32 option)
|
||||||
?(min:float option)
|
?(min:float option)
|
||||||
?(max:float option)
|
?(max:float option)
|
||||||
|
|
@ -538,7 +525,7 @@ let copy_histogram (self:histogram) : histogram =
|
||||||
{ self with data_points = self.data_points }
|
{ self with data_points = self.data_points }
|
||||||
|
|
||||||
let make_histogram
|
let make_histogram
|
||||||
~(data_points:histogram_data_point list)
|
?(data_points=[])
|
||||||
?(aggregation_temporality:aggregation_temporality option)
|
?(aggregation_temporality:aggregation_temporality option)
|
||||||
() : histogram =
|
() : histogram =
|
||||||
let _res = default_histogram () in
|
let _res = default_histogram () in
|
||||||
|
|
@ -560,7 +547,7 @@ let copy_exponential_histogram_data_point_buckets (self:exponential_histogram_da
|
||||||
|
|
||||||
let make_exponential_histogram_data_point_buckets
|
let make_exponential_histogram_data_point_buckets
|
||||||
?(offset:int32 option)
|
?(offset:int32 option)
|
||||||
~(bucket_counts:int64 list)
|
?(bucket_counts=[])
|
||||||
() : exponential_histogram_data_point_buckets =
|
() : exponential_histogram_data_point_buckets =
|
||||||
let _res = default_exponential_histogram_data_point_buckets () in
|
let _res = default_exponential_histogram_data_point_buckets () in
|
||||||
(match offset with
|
(match offset with
|
||||||
|
|
@ -610,7 +597,7 @@ let copy_exponential_histogram_data_point (self:exponential_histogram_data_point
|
||||||
{ self with attributes = self.attributes }
|
{ self with attributes = self.attributes }
|
||||||
|
|
||||||
let make_exponential_histogram_data_point
|
let make_exponential_histogram_data_point
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(start_time_unix_nano:int64 option)
|
?(start_time_unix_nano:int64 option)
|
||||||
?(time_unix_nano:int64 option)
|
?(time_unix_nano:int64 option)
|
||||||
?(count:int64 option)
|
?(count:int64 option)
|
||||||
|
|
@ -620,7 +607,7 @@ let make_exponential_histogram_data_point
|
||||||
?(positive:exponential_histogram_data_point_buckets option)
|
?(positive:exponential_histogram_data_point_buckets option)
|
||||||
?(negative:exponential_histogram_data_point_buckets option)
|
?(negative:exponential_histogram_data_point_buckets option)
|
||||||
?(flags:int32 option)
|
?(flags:int32 option)
|
||||||
~(exemplars:exemplar list)
|
?(exemplars=[])
|
||||||
?(min:float option)
|
?(min:float option)
|
||||||
?(max:float option)
|
?(max:float option)
|
||||||
?(zero_threshold:float option)
|
?(zero_threshold:float option)
|
||||||
|
|
@ -677,7 +664,7 @@ let copy_exponential_histogram (self:exponential_histogram) : exponential_histog
|
||||||
{ self with data_points = self.data_points }
|
{ self with data_points = self.data_points }
|
||||||
|
|
||||||
let make_exponential_histogram
|
let make_exponential_histogram
|
||||||
~(data_points:exponential_histogram_data_point list)
|
?(data_points=[])
|
||||||
?(aggregation_temporality:aggregation_temporality option)
|
?(aggregation_temporality:aggregation_temporality option)
|
||||||
() : exponential_histogram =
|
() : exponential_histogram =
|
||||||
let _res = default_exponential_histogram () in
|
let _res = default_exponential_histogram () in
|
||||||
|
|
@ -736,12 +723,12 @@ let copy_summary_data_point (self:summary_data_point) : summary_data_point =
|
||||||
{ self with attributes = self.attributes }
|
{ self with attributes = self.attributes }
|
||||||
|
|
||||||
let make_summary_data_point
|
let make_summary_data_point
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(start_time_unix_nano:int64 option)
|
?(start_time_unix_nano:int64 option)
|
||||||
?(time_unix_nano:int64 option)
|
?(time_unix_nano:int64 option)
|
||||||
?(count:int64 option)
|
?(count:int64 option)
|
||||||
?(sum:float option)
|
?(sum:float option)
|
||||||
~(quantile_values:summary_data_point_value_at_quantile list)
|
?(quantile_values=[])
|
||||||
?(flags:int32 option)
|
?(flags:int32 option)
|
||||||
() : summary_data_point =
|
() : summary_data_point =
|
||||||
let _res = default_summary_data_point () in
|
let _res = default_summary_data_point () in
|
||||||
|
|
@ -772,7 +759,7 @@ let copy_summary (self:summary) : summary =
|
||||||
{ self with data_points = self.data_points }
|
{ self with data_points = self.data_points }
|
||||||
|
|
||||||
let make_summary
|
let make_summary
|
||||||
~(data_points:summary_data_point list)
|
?(data_points=[])
|
||||||
() : summary =
|
() : summary =
|
||||||
let _res = default_summary () in
|
let _res = default_summary () in
|
||||||
set_summary_data_points _res data_points;
|
set_summary_data_points _res data_points;
|
||||||
|
|
@ -802,7 +789,7 @@ let make_metric
|
||||||
?(description:string option)
|
?(description:string option)
|
||||||
?(unit_:string option)
|
?(unit_:string option)
|
||||||
?(data:metric_data option)
|
?(data:metric_data option)
|
||||||
~(metadata:Common.key_value list)
|
?(metadata=[])
|
||||||
() : metric =
|
() : metric =
|
||||||
let _res = default_metric () in
|
let _res = default_metric () in
|
||||||
(match name with
|
(match name with
|
||||||
|
|
@ -834,7 +821,7 @@ let copy_scope_metrics (self:scope_metrics) : scope_metrics =
|
||||||
|
|
||||||
let make_scope_metrics
|
let make_scope_metrics
|
||||||
?(scope:Common.instrumentation_scope option)
|
?(scope:Common.instrumentation_scope option)
|
||||||
~(metrics:metric list)
|
?(metrics=[])
|
||||||
?(schema_url:string option)
|
?(schema_url:string option)
|
||||||
() : scope_metrics =
|
() : scope_metrics =
|
||||||
let _res = default_scope_metrics () in
|
let _res = default_scope_metrics () in
|
||||||
|
|
@ -861,7 +848,7 @@ let copy_resource_metrics (self:resource_metrics) : resource_metrics =
|
||||||
|
|
||||||
let make_resource_metrics
|
let make_resource_metrics
|
||||||
?(resource:Resource.resource option)
|
?(resource:Resource.resource option)
|
||||||
~(scope_metrics:scope_metrics list)
|
?(scope_metrics=[])
|
||||||
?(schema_url:string option)
|
?(schema_url:string option)
|
||||||
() : resource_metrics =
|
() : resource_metrics =
|
||||||
let _res = default_resource_metrics () in
|
let _res = default_resource_metrics () in
|
||||||
|
|
@ -882,7 +869,7 @@ let copy_metrics_data (self:metrics_data) : metrics_data =
|
||||||
{ self with resource_metrics = self.resource_metrics }
|
{ self with resource_metrics = self.resource_metrics }
|
||||||
|
|
||||||
let make_metrics_data
|
let make_metrics_data
|
||||||
~(resource_metrics:resource_metrics list)
|
?(resource_metrics=[])
|
||||||
() : metrics_data =
|
() : metrics_data =
|
||||||
let _res = default_metrics_data () in
|
let _res = default_metrics_data () in
|
||||||
set_metrics_data_resource_metrics _res resource_metrics;
|
set_metrics_data_resource_metrics _res resource_metrics;
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ type exemplar_value =
|
||||||
| As_int of int64
|
| As_int of int64
|
||||||
|
|
||||||
and exemplar = private {
|
and exemplar = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable filtered_attributes : Common.key_value list;
|
mutable filtered_attributes : Common.key_value list;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
mutable value : exemplar_value option;
|
mutable value : exemplar_value option;
|
||||||
|
|
@ -26,8 +25,7 @@ type number_data_point_value =
|
||||||
| As_int of int64
|
| As_int of int64
|
||||||
|
|
||||||
and number_data_point = private {
|
and number_data_point = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -46,16 +44,14 @@ type aggregation_temporality =
|
||||||
| Aggregation_temporality_cumulative
|
| Aggregation_temporality_cumulative
|
||||||
|
|
||||||
type sum = private {
|
type sum = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable data_points : number_data_point list;
|
mutable data_points : number_data_point list;
|
||||||
mutable aggregation_temporality : aggregation_temporality;
|
mutable aggregation_temporality : aggregation_temporality;
|
||||||
mutable is_monotonic : bool;
|
mutable is_monotonic : bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
type histogram_data_point = private {
|
type histogram_data_point = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *)
|
||||||
(** tracking presence for 4 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -70,22 +66,19 @@ type histogram_data_point = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type histogram = private {
|
type histogram = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable data_points : histogram_data_point list;
|
mutable data_points : histogram_data_point list;
|
||||||
mutable aggregation_temporality : aggregation_temporality;
|
mutable aggregation_temporality : aggregation_temporality;
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram_data_point_buckets = private {
|
type exponential_histogram_data_point_buckets = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable offset : int32;
|
mutable offset : int32;
|
||||||
mutable bucket_counts : int64 list;
|
mutable bucket_counts : int64 list;
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram_data_point = private {
|
type exponential_histogram_data_point = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *)
|
||||||
(** tracking presence for 7 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -103,22 +96,19 @@ type exponential_histogram_data_point = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type exponential_histogram = private {
|
type exponential_histogram = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable data_points : exponential_histogram_data_point list;
|
mutable data_points : exponential_histogram_data_point list;
|
||||||
mutable aggregation_temporality : aggregation_temporality;
|
mutable aggregation_temporality : aggregation_temporality;
|
||||||
}
|
}
|
||||||
|
|
||||||
type summary_data_point_value_at_quantile = private {
|
type summary_data_point_value_at_quantile = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable quantile : float;
|
mutable quantile : float;
|
||||||
mutable value : float;
|
mutable value : float;
|
||||||
}
|
}
|
||||||
|
|
||||||
type summary_data_point = private {
|
type summary_data_point = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *)
|
||||||
(** tracking presence for 5 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable start_time_unix_nano : int64;
|
mutable start_time_unix_nano : int64;
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
|
|
@ -140,8 +130,7 @@ type metric_data =
|
||||||
| Summary of summary
|
| Summary of summary
|
||||||
|
|
||||||
and metric = private {
|
and metric = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable name : string;
|
mutable name : string;
|
||||||
mutable description : string;
|
mutable description : string;
|
||||||
mutable unit_ : string;
|
mutable unit_ : string;
|
||||||
|
|
@ -150,16 +139,14 @@ and metric = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type scope_metrics = private {
|
type scope_metrics = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable scope : Common.instrumentation_scope option;
|
mutable scope : Common.instrumentation_scope option;
|
||||||
mutable metrics : metric list;
|
mutable metrics : metric list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type resource_metrics = private {
|
type resource_metrics = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable resource : Resource.resource option;
|
mutable resource : Resource.resource option;
|
||||||
mutable scope_metrics : scope_metrics list;
|
mutable scope_metrics : scope_metrics list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
|
|
@ -244,7 +231,7 @@ val default_data_point_flags : unit -> data_point_flags
|
||||||
|
|
||||||
|
|
||||||
val make_exemplar :
|
val make_exemplar :
|
||||||
filtered_attributes:Common.key_value list ->
|
?filtered_attributes:Common.key_value list ->
|
||||||
?time_unix_nano:int64 ->
|
?time_unix_nano:int64 ->
|
||||||
?value:exemplar_value ->
|
?value:exemplar_value ->
|
||||||
?span_id:bytes ->
|
?span_id:bytes ->
|
||||||
|
|
@ -281,11 +268,11 @@ val set_exemplar_trace_id : exemplar -> bytes -> unit
|
||||||
|
|
||||||
|
|
||||||
val make_number_data_point :
|
val make_number_data_point :
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.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 ->
|
?value:number_data_point_value ->
|
||||||
exemplars:exemplar list ->
|
?exemplars:exemplar list ->
|
||||||
?flags:int32 ->
|
?flags:int32 ->
|
||||||
unit ->
|
unit ->
|
||||||
number_data_point
|
number_data_point
|
||||||
|
|
@ -321,7 +308,7 @@ val set_number_data_point_flags : number_data_point -> int32 -> unit
|
||||||
(** set field flags in number_data_point *)
|
(** set field flags in number_data_point *)
|
||||||
|
|
||||||
val make_gauge :
|
val make_gauge :
|
||||||
data_points:number_data_point list ->
|
?data_points:number_data_point list ->
|
||||||
unit ->
|
unit ->
|
||||||
gauge
|
gauge
|
||||||
(** [make_gauge … ()] is a builder for type [gauge] *)
|
(** [make_gauge … ()] is a builder for type [gauge] *)
|
||||||
|
|
@ -333,7 +320,7 @@ val set_gauge_data_points : gauge -> number_data_point list -> unit
|
||||||
|
|
||||||
|
|
||||||
val make_sum :
|
val make_sum :
|
||||||
data_points:number_data_point list ->
|
?data_points:number_data_point list ->
|
||||||
?aggregation_temporality:aggregation_temporality ->
|
?aggregation_temporality:aggregation_temporality ->
|
||||||
?is_monotonic:bool ->
|
?is_monotonic:bool ->
|
||||||
unit ->
|
unit ->
|
||||||
|
|
@ -358,14 +345,14 @@ val set_sum_is_monotonic : sum -> bool -> unit
|
||||||
(** set field is_monotonic in sum *)
|
(** set field is_monotonic in sum *)
|
||||||
|
|
||||||
val make_histogram_data_point :
|
val make_histogram_data_point :
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?start_time_unix_nano:int64 ->
|
?start_time_unix_nano:int64 ->
|
||||||
?time_unix_nano:int64 ->
|
?time_unix_nano:int64 ->
|
||||||
?count:int64 ->
|
?count:int64 ->
|
||||||
?sum:float ->
|
?sum:float ->
|
||||||
bucket_counts:int64 list ->
|
?bucket_counts:int64 list ->
|
||||||
explicit_bounds:float list ->
|
?explicit_bounds:float list ->
|
||||||
exemplars:exemplar list ->
|
?exemplars:exemplar list ->
|
||||||
?flags:int32 ->
|
?flags:int32 ->
|
||||||
?min:float ->
|
?min:float ->
|
||||||
?max:float ->
|
?max:float ->
|
||||||
|
|
@ -421,7 +408,7 @@ val set_histogram_data_point_max : histogram_data_point -> float -> unit
|
||||||
(** set field max in histogram_data_point *)
|
(** set field max in histogram_data_point *)
|
||||||
|
|
||||||
val make_histogram :
|
val make_histogram :
|
||||||
data_points:histogram_data_point list ->
|
?data_points:histogram_data_point list ->
|
||||||
?aggregation_temporality:aggregation_temporality ->
|
?aggregation_temporality:aggregation_temporality ->
|
||||||
unit ->
|
unit ->
|
||||||
histogram
|
histogram
|
||||||
|
|
@ -440,7 +427,7 @@ val set_histogram_aggregation_temporality : histogram -> aggregation_temporality
|
||||||
|
|
||||||
val make_exponential_histogram_data_point_buckets :
|
val make_exponential_histogram_data_point_buckets :
|
||||||
?offset:int32 ->
|
?offset:int32 ->
|
||||||
bucket_counts:int64 list ->
|
?bucket_counts:int64 list ->
|
||||||
unit ->
|
unit ->
|
||||||
exponential_histogram_data_point_buckets
|
exponential_histogram_data_point_buckets
|
||||||
(** [make_exponential_histogram_data_point_buckets … ()] is a builder for type [exponential_histogram_data_point_buckets] *)
|
(** [make_exponential_histogram_data_point_buckets … ()] is a builder for type [exponential_histogram_data_point_buckets] *)
|
||||||
|
|
@ -457,7 +444,7 @@ val set_exponential_histogram_data_point_buckets_bucket_counts : exponential_his
|
||||||
(** set field bucket_counts in exponential_histogram_data_point_buckets *)
|
(** set field bucket_counts in exponential_histogram_data_point_buckets *)
|
||||||
|
|
||||||
val make_exponential_histogram_data_point :
|
val make_exponential_histogram_data_point :
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?start_time_unix_nano:int64 ->
|
?start_time_unix_nano:int64 ->
|
||||||
?time_unix_nano:int64 ->
|
?time_unix_nano:int64 ->
|
||||||
?count:int64 ->
|
?count:int64 ->
|
||||||
|
|
@ -467,7 +454,7 @@ val make_exponential_histogram_data_point :
|
||||||
?positive:exponential_histogram_data_point_buckets ->
|
?positive:exponential_histogram_data_point_buckets ->
|
||||||
?negative:exponential_histogram_data_point_buckets ->
|
?negative:exponential_histogram_data_point_buckets ->
|
||||||
?flags:int32 ->
|
?flags:int32 ->
|
||||||
exemplars:exemplar list ->
|
?exemplars:exemplar list ->
|
||||||
?min:float ->
|
?min:float ->
|
||||||
?max:float ->
|
?max:float ->
|
||||||
?zero_threshold:float ->
|
?zero_threshold:float ->
|
||||||
|
|
@ -541,7 +528,7 @@ val set_exponential_histogram_data_point_zero_threshold : exponential_histogram_
|
||||||
(** set field zero_threshold in exponential_histogram_data_point *)
|
(** set field zero_threshold in exponential_histogram_data_point *)
|
||||||
|
|
||||||
val make_exponential_histogram :
|
val make_exponential_histogram :
|
||||||
data_points:exponential_histogram_data_point list ->
|
?data_points:exponential_histogram_data_point list ->
|
||||||
?aggregation_temporality:aggregation_temporality ->
|
?aggregation_temporality:aggregation_temporality ->
|
||||||
unit ->
|
unit ->
|
||||||
exponential_histogram
|
exponential_histogram
|
||||||
|
|
@ -580,12 +567,12 @@ val set_summary_data_point_value_at_quantile_value : summary_data_point_value_at
|
||||||
(** set field value in summary_data_point_value_at_quantile *)
|
(** set field value in summary_data_point_value_at_quantile *)
|
||||||
|
|
||||||
val make_summary_data_point :
|
val make_summary_data_point :
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?start_time_unix_nano:int64 ->
|
?start_time_unix_nano:int64 ->
|
||||||
?time_unix_nano:int64 ->
|
?time_unix_nano:int64 ->
|
||||||
?count:int64 ->
|
?count:int64 ->
|
||||||
?sum:float ->
|
?sum:float ->
|
||||||
quantile_values:summary_data_point_value_at_quantile list ->
|
?quantile_values:summary_data_point_value_at_quantile list ->
|
||||||
?flags:int32 ->
|
?flags:int32 ->
|
||||||
unit ->
|
unit ->
|
||||||
summary_data_point
|
summary_data_point
|
||||||
|
|
@ -630,7 +617,7 @@ val set_summary_data_point_flags : summary_data_point -> int32 -> unit
|
||||||
(** set field flags in summary_data_point *)
|
(** set field flags in summary_data_point *)
|
||||||
|
|
||||||
val make_summary :
|
val make_summary :
|
||||||
data_points:summary_data_point list ->
|
?data_points:summary_data_point list ->
|
||||||
unit ->
|
unit ->
|
||||||
summary
|
summary
|
||||||
(** [make_summary … ()] is a builder for type [summary] *)
|
(** [make_summary … ()] is a builder for type [summary] *)
|
||||||
|
|
@ -646,7 +633,7 @@ val make_metric :
|
||||||
?description:string ->
|
?description:string ->
|
||||||
?unit_:string ->
|
?unit_:string ->
|
||||||
?data:metric_data ->
|
?data:metric_data ->
|
||||||
metadata:Common.key_value list ->
|
?metadata:Common.key_value list ->
|
||||||
unit ->
|
unit ->
|
||||||
metric
|
metric
|
||||||
(** [make_metric … ()] is a builder for type [metric] *)
|
(** [make_metric … ()] is a builder for type [metric] *)
|
||||||
|
|
@ -679,7 +666,7 @@ val set_metric_metadata : metric -> Common.key_value list -> unit
|
||||||
|
|
||||||
val make_scope_metrics :
|
val make_scope_metrics :
|
||||||
?scope:Common.instrumentation_scope ->
|
?scope:Common.instrumentation_scope ->
|
||||||
metrics:metric list ->
|
?metrics:metric list ->
|
||||||
?schema_url:string ->
|
?schema_url:string ->
|
||||||
unit ->
|
unit ->
|
||||||
scope_metrics
|
scope_metrics
|
||||||
|
|
@ -701,7 +688,7 @@ val set_scope_metrics_schema_url : scope_metrics -> string -> unit
|
||||||
|
|
||||||
val make_resource_metrics :
|
val make_resource_metrics :
|
||||||
?resource:Resource.resource ->
|
?resource:Resource.resource ->
|
||||||
scope_metrics:scope_metrics list ->
|
?scope_metrics:scope_metrics list ->
|
||||||
?schema_url:string ->
|
?schema_url:string ->
|
||||||
unit ->
|
unit ->
|
||||||
resource_metrics
|
resource_metrics
|
||||||
|
|
@ -722,7 +709,7 @@ val set_resource_metrics_schema_url : resource_metrics -> string -> unit
|
||||||
(** set field schema_url in resource_metrics *)
|
(** set field schema_url in resource_metrics *)
|
||||||
|
|
||||||
val make_metrics_data :
|
val make_metrics_data :
|
||||||
resource_metrics:resource_metrics list ->
|
?resource_metrics:resource_metrics list ->
|
||||||
unit ->
|
unit ->
|
||||||
metrics_data
|
metrics_data
|
||||||
(** [make_metrics_data … ()] is a builder for type [metrics_data] *)
|
(** [make_metrics_data … ()] is a builder for type [metrics_data] *)
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ type export_metrics_service_request = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type export_metrics_partial_success = {
|
type export_metrics_partial_success = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable rejected_data_points : int64;
|
mutable rejected_data_points : int64;
|
||||||
mutable error_message : string;
|
mutable error_message : string;
|
||||||
}
|
}
|
||||||
|
|
@ -43,7 +42,7 @@ let copy_export_metrics_service_request (self:export_metrics_service_request) :
|
||||||
{ self with resource_metrics = self.resource_metrics }
|
{ self with resource_metrics = self.resource_metrics }
|
||||||
|
|
||||||
let make_export_metrics_service_request
|
let make_export_metrics_service_request
|
||||||
~(resource_metrics:Metrics.resource_metrics list)
|
?(resource_metrics=[])
|
||||||
() : export_metrics_service_request =
|
() : export_metrics_service_request =
|
||||||
let _res = default_export_metrics_service_request () in
|
let _res = default_export_metrics_service_request () in
|
||||||
set_export_metrics_service_request_resource_metrics _res resource_metrics;
|
set_export_metrics_service_request_resource_metrics _res resource_metrics;
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ type export_metrics_service_request = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type export_metrics_partial_success = private {
|
type export_metrics_partial_success = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable rejected_data_points : int64;
|
mutable rejected_data_points : int64;
|
||||||
mutable error_message : string;
|
mutable error_message : string;
|
||||||
}
|
}
|
||||||
|
|
@ -38,7 +37,7 @@ val default_export_metrics_service_response : unit -> export_metrics_service_res
|
||||||
(** {2 Make functions} *)
|
(** {2 Make functions} *)
|
||||||
|
|
||||||
val make_export_metrics_service_request :
|
val make_export_metrics_service_request :
|
||||||
resource_metrics:Metrics.resource_metrics list ->
|
?resource_metrics:Metrics.resource_metrics list ->
|
||||||
unit ->
|
unit ->
|
||||||
export_metrics_service_request
|
export_metrics_service_request
|
||||||
(** [make_export_metrics_service_request … ()] is a builder for type [export_metrics_service_request] *)
|
(** [make_export_metrics_service_request … ()] is a builder for type [export_metrics_service_request] *)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
[@@@ocaml.warning "-23-27-30-39-44"]
|
[@@@ocaml.warning "-23-27-30-39-44"]
|
||||||
|
|
||||||
type resource = {
|
type resource = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable dropped_attributes_count : int32;
|
mutable dropped_attributes_count : int32;
|
||||||
mutable entity_refs : Common.entity_ref list;
|
mutable entity_refs : Common.entity_ref list;
|
||||||
|
|
@ -32,9 +31,9 @@ let copy_resource (self:resource) : resource =
|
||||||
{ self with attributes = self.attributes }
|
{ self with attributes = self.attributes }
|
||||||
|
|
||||||
let make_resource
|
let make_resource
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(dropped_attributes_count:int32 option)
|
?(dropped_attributes_count:int32 option)
|
||||||
~(entity_refs:Common.entity_ref list)
|
?(entity_refs=[])
|
||||||
() : resource =
|
() : resource =
|
||||||
let _res = default_resource () in
|
let _res = default_resource () in
|
||||||
set_resource_attributes _res attributes;
|
set_resource_attributes _res attributes;
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
(** {2 Types} *)
|
(** {2 Types} *)
|
||||||
|
|
||||||
type resource = private {
|
type resource = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
mutable dropped_attributes_count : int32;
|
mutable dropped_attributes_count : int32;
|
||||||
mutable entity_refs : Common.entity_ref list;
|
mutable entity_refs : Common.entity_ref list;
|
||||||
|
|
@ -25,9 +24,9 @@ val default_resource : unit -> resource
|
||||||
(** {2 Make functions} *)
|
(** {2 Make functions} *)
|
||||||
|
|
||||||
val make_resource :
|
val make_resource :
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?dropped_attributes_count:int32 ->
|
?dropped_attributes_count:int32 ->
|
||||||
entity_refs:Common.entity_ref list ->
|
?entity_refs:Common.entity_ref list ->
|
||||||
unit ->
|
unit ->
|
||||||
resource
|
resource
|
||||||
(** [make_resource … ()] is a builder for type [resource] *)
|
(** [make_resource … ()] is a builder for type [resource] *)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
[@@@ocaml.warning "-23-27-30-39-44"]
|
[@@@ocaml.warning "-23-27-30-39-44"]
|
||||||
|
|
||||||
type status = {
|
type status = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable code : int32;
|
mutable code : int32;
|
||||||
mutable message : bytes;
|
mutable message : bytes;
|
||||||
mutable details : bytes list;
|
mutable details : bytes list;
|
||||||
|
|
@ -35,7 +34,7 @@ let copy_status (self:status) : status =
|
||||||
let make_status
|
let make_status
|
||||||
?(code:int32 option)
|
?(code:int32 option)
|
||||||
?(message:bytes option)
|
?(message:bytes option)
|
||||||
~(details:bytes list)
|
?(details=[])
|
||||||
() : status =
|
() : status =
|
||||||
let _res = default_status () in
|
let _res = default_status () in
|
||||||
(match code with
|
(match code with
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
(** {2 Types} *)
|
(** {2 Types} *)
|
||||||
|
|
||||||
type status = private {
|
type status = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable code : int32;
|
mutable code : int32;
|
||||||
mutable message : bytes;
|
mutable message : bytes;
|
||||||
mutable details : bytes list;
|
mutable details : bytes list;
|
||||||
|
|
@ -27,7 +26,7 @@ val default_status : unit -> status
|
||||||
val make_status :
|
val make_status :
|
||||||
?code:int32 ->
|
?code:int32 ->
|
||||||
?message:bytes ->
|
?message:bytes ->
|
||||||
details:bytes list ->
|
?details:bytes list ->
|
||||||
unit ->
|
unit ->
|
||||||
status
|
status
|
||||||
(** [make_status … ()] is a builder for type [status] *)
|
(** [make_status … ()] is a builder for type [status] *)
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@ type span_span_kind =
|
||||||
| Span_kind_consumer
|
| Span_kind_consumer
|
||||||
|
|
||||||
type span_event = {
|
type span_event = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
mutable name : string;
|
mutable name : string;
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
|
|
@ -18,8 +17,7 @@ type span_event = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type span_link = {
|
type span_link = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *)
|
||||||
(** tracking presence for 5 fields *)
|
|
||||||
mutable trace_id : bytes;
|
mutable trace_id : bytes;
|
||||||
mutable span_id : bytes;
|
mutable span_id : bytes;
|
||||||
mutable trace_state : string;
|
mutable trace_state : string;
|
||||||
|
|
@ -34,15 +32,13 @@ type status_status_code =
|
||||||
| Status_code_error
|
| Status_code_error
|
||||||
|
|
||||||
type status = {
|
type status = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable message : string;
|
mutable message : string;
|
||||||
mutable code : status_status_code;
|
mutable code : status_status_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
type span = {
|
type span = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 12 fields *)
|
||||||
(** tracking presence for 12 fields *)
|
|
||||||
mutable trace_id : bytes;
|
mutable trace_id : bytes;
|
||||||
mutable span_id : bytes;
|
mutable span_id : bytes;
|
||||||
mutable trace_state : string;
|
mutable trace_state : string;
|
||||||
|
|
@ -62,16 +58,14 @@ type span = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type scope_spans = {
|
type scope_spans = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable scope : Common.instrumentation_scope option;
|
mutable scope : Common.instrumentation_scope option;
|
||||||
mutable spans : span list;
|
mutable spans : span list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type resource_spans = {
|
type resource_spans = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable resource : Resource.resource option;
|
mutable resource : Resource.resource option;
|
||||||
mutable scope_spans : scope_spans list;
|
mutable scope_spans : scope_spans list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
|
|
@ -185,7 +179,7 @@ let copy_span_event (self:span_event) : span_event =
|
||||||
let make_span_event
|
let make_span_event
|
||||||
?(time_unix_nano:int64 option)
|
?(time_unix_nano:int64 option)
|
||||||
?(name:string option)
|
?(name:string option)
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(dropped_attributes_count:int32 option)
|
?(dropped_attributes_count:int32 option)
|
||||||
() : span_event =
|
() : span_event =
|
||||||
let _res = default_span_event () in
|
let _res = default_span_event () in
|
||||||
|
|
@ -227,7 +221,7 @@ let make_span_link
|
||||||
?(trace_id:bytes option)
|
?(trace_id:bytes option)
|
||||||
?(span_id:bytes option)
|
?(span_id:bytes option)
|
||||||
?(trace_state:string option)
|
?(trace_state:string option)
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(dropped_attributes_count:int32 option)
|
?(dropped_attributes_count:int32 option)
|
||||||
?(flags:int32 option)
|
?(flags:int32 option)
|
||||||
() : span_link =
|
() : span_link =
|
||||||
|
|
@ -334,11 +328,11 @@ let make_span
|
||||||
?(kind:span_span_kind option)
|
?(kind:span_span_kind option)
|
||||||
?(start_time_unix_nano:int64 option)
|
?(start_time_unix_nano:int64 option)
|
||||||
?(end_time_unix_nano:int64 option)
|
?(end_time_unix_nano:int64 option)
|
||||||
~(attributes:Common.key_value list)
|
?(attributes=[])
|
||||||
?(dropped_attributes_count:int32 option)
|
?(dropped_attributes_count:int32 option)
|
||||||
~(events:span_event list)
|
?(events=[])
|
||||||
?(dropped_events_count:int32 option)
|
?(dropped_events_count:int32 option)
|
||||||
~(links:span_link list)
|
?(links=[])
|
||||||
?(dropped_links_count:int32 option)
|
?(dropped_links_count:int32 option)
|
||||||
?(status:status option)
|
?(status:status option)
|
||||||
() : span =
|
() : span =
|
||||||
|
|
@ -401,7 +395,7 @@ let copy_scope_spans (self:scope_spans) : scope_spans =
|
||||||
|
|
||||||
let make_scope_spans
|
let make_scope_spans
|
||||||
?(scope:Common.instrumentation_scope option)
|
?(scope:Common.instrumentation_scope option)
|
||||||
~(spans:span list)
|
?(spans=[])
|
||||||
?(schema_url:string option)
|
?(schema_url:string option)
|
||||||
() : scope_spans =
|
() : scope_spans =
|
||||||
let _res = default_scope_spans () in
|
let _res = default_scope_spans () in
|
||||||
|
|
@ -428,7 +422,7 @@ let copy_resource_spans (self:resource_spans) : resource_spans =
|
||||||
|
|
||||||
let make_resource_spans
|
let make_resource_spans
|
||||||
?(resource:Resource.resource option)
|
?(resource:Resource.resource option)
|
||||||
~(scope_spans:scope_spans list)
|
?(scope_spans=[])
|
||||||
?(schema_url:string option)
|
?(schema_url:string option)
|
||||||
() : resource_spans =
|
() : resource_spans =
|
||||||
let _res = default_resource_spans () in
|
let _res = default_resource_spans () in
|
||||||
|
|
@ -449,7 +443,7 @@ let copy_traces_data (self:traces_data) : traces_data =
|
||||||
{ self with resource_spans = self.resource_spans }
|
{ self with resource_spans = self.resource_spans }
|
||||||
|
|
||||||
let make_traces_data
|
let make_traces_data
|
||||||
~(resource_spans:resource_spans list)
|
?(resource_spans=[])
|
||||||
() : traces_data =
|
() : traces_data =
|
||||||
let _res = default_traces_data () in
|
let _res = default_traces_data () in
|
||||||
set_traces_data_resource_spans _res resource_spans;
|
set_traces_data_resource_spans _res resource_spans;
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ type span_span_kind =
|
||||||
| Span_kind_consumer
|
| Span_kind_consumer
|
||||||
|
|
||||||
type span_event = private {
|
type span_event = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *)
|
||||||
(** tracking presence for 3 fields *)
|
|
||||||
mutable time_unix_nano : int64;
|
mutable time_unix_nano : int64;
|
||||||
mutable name : string;
|
mutable name : string;
|
||||||
mutable attributes : Common.key_value list;
|
mutable attributes : Common.key_value list;
|
||||||
|
|
@ -25,8 +24,7 @@ type span_event = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type span_link = private {
|
type span_link = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *)
|
||||||
(** tracking presence for 5 fields *)
|
|
||||||
mutable trace_id : bytes;
|
mutable trace_id : bytes;
|
||||||
mutable span_id : bytes;
|
mutable span_id : bytes;
|
||||||
mutable trace_state : string;
|
mutable trace_state : string;
|
||||||
|
|
@ -41,15 +39,13 @@ type status_status_code =
|
||||||
| Status_code_error
|
| Status_code_error
|
||||||
|
|
||||||
type status = private {
|
type status = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable message : string;
|
mutable message : string;
|
||||||
mutable code : status_status_code;
|
mutable code : status_status_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
type span = private {
|
type span = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 12 fields *)
|
||||||
(** tracking presence for 12 fields *)
|
|
||||||
mutable trace_id : bytes;
|
mutable trace_id : bytes;
|
||||||
mutable span_id : bytes;
|
mutable span_id : bytes;
|
||||||
mutable trace_state : string;
|
mutable trace_state : string;
|
||||||
|
|
@ -69,16 +65,14 @@ type span = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type scope_spans = private {
|
type scope_spans = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable scope : Common.instrumentation_scope option;
|
mutable scope : Common.instrumentation_scope option;
|
||||||
mutable spans : span list;
|
mutable spans : span list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type resource_spans = private {
|
type resource_spans = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *)
|
||||||
(** tracking presence for 1 fields *)
|
|
||||||
mutable resource : Resource.resource option;
|
mutable resource : Resource.resource option;
|
||||||
mutable scope_spans : scope_spans list;
|
mutable scope_spans : scope_spans list;
|
||||||
mutable schema_url : string;
|
mutable schema_url : string;
|
||||||
|
|
@ -134,7 +128,7 @@ val default_span_flags : unit -> span_flags
|
||||||
val make_span_event :
|
val make_span_event :
|
||||||
?time_unix_nano:int64 ->
|
?time_unix_nano:int64 ->
|
||||||
?name:string ->
|
?name:string ->
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?dropped_attributes_count:int32 ->
|
?dropped_attributes_count:int32 ->
|
||||||
unit ->
|
unit ->
|
||||||
span_event
|
span_event
|
||||||
|
|
@ -167,7 +161,7 @@ val make_span_link :
|
||||||
?trace_id:bytes ->
|
?trace_id:bytes ->
|
||||||
?span_id:bytes ->
|
?span_id:bytes ->
|
||||||
?trace_state:string ->
|
?trace_state:string ->
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?dropped_attributes_count:int32 ->
|
?dropped_attributes_count:int32 ->
|
||||||
?flags:int32 ->
|
?flags:int32 ->
|
||||||
unit ->
|
unit ->
|
||||||
|
|
@ -241,11 +235,11 @@ val make_span :
|
||||||
?kind:span_span_kind ->
|
?kind:span_span_kind ->
|
||||||
?start_time_unix_nano:int64 ->
|
?start_time_unix_nano:int64 ->
|
||||||
?end_time_unix_nano:int64 ->
|
?end_time_unix_nano:int64 ->
|
||||||
attributes:Common.key_value list ->
|
?attributes:Common.key_value list ->
|
||||||
?dropped_attributes_count:int32 ->
|
?dropped_attributes_count:int32 ->
|
||||||
events:span_event list ->
|
?events:span_event list ->
|
||||||
?dropped_events_count:int32 ->
|
?dropped_events_count:int32 ->
|
||||||
links:span_link list ->
|
?links:span_link list ->
|
||||||
?dropped_links_count:int32 ->
|
?dropped_links_count:int32 ->
|
||||||
?status:status ->
|
?status:status ->
|
||||||
unit ->
|
unit ->
|
||||||
|
|
@ -340,7 +334,7 @@ val set_span_status : span -> status -> unit
|
||||||
|
|
||||||
val make_scope_spans :
|
val make_scope_spans :
|
||||||
?scope:Common.instrumentation_scope ->
|
?scope:Common.instrumentation_scope ->
|
||||||
spans:span list ->
|
?spans:span list ->
|
||||||
?schema_url:string ->
|
?schema_url:string ->
|
||||||
unit ->
|
unit ->
|
||||||
scope_spans
|
scope_spans
|
||||||
|
|
@ -362,7 +356,7 @@ val set_scope_spans_schema_url : scope_spans -> string -> unit
|
||||||
|
|
||||||
val make_resource_spans :
|
val make_resource_spans :
|
||||||
?resource:Resource.resource ->
|
?resource:Resource.resource ->
|
||||||
scope_spans:scope_spans list ->
|
?scope_spans:scope_spans list ->
|
||||||
?schema_url:string ->
|
?schema_url:string ->
|
||||||
unit ->
|
unit ->
|
||||||
resource_spans
|
resource_spans
|
||||||
|
|
@ -383,7 +377,7 @@ val set_resource_spans_schema_url : resource_spans -> string -> unit
|
||||||
(** set field schema_url in resource_spans *)
|
(** set field schema_url in resource_spans *)
|
||||||
|
|
||||||
val make_traces_data :
|
val make_traces_data :
|
||||||
resource_spans:resource_spans list ->
|
?resource_spans:resource_spans list ->
|
||||||
unit ->
|
unit ->
|
||||||
traces_data
|
traces_data
|
||||||
(** [make_traces_data … ()] is a builder for type [traces_data] *)
|
(** [make_traces_data … ()] is a builder for type [traces_data] *)
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ type export_trace_service_request = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type export_trace_partial_success = {
|
type export_trace_partial_success = {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable rejected_spans : int64;
|
mutable rejected_spans : int64;
|
||||||
mutable error_message : string;
|
mutable error_message : string;
|
||||||
}
|
}
|
||||||
|
|
@ -43,7 +42,7 @@ let copy_export_trace_service_request (self:export_trace_service_request) : expo
|
||||||
{ self with resource_spans = self.resource_spans }
|
{ self with resource_spans = self.resource_spans }
|
||||||
|
|
||||||
let make_export_trace_service_request
|
let make_export_trace_service_request
|
||||||
~(resource_spans:Trace.resource_spans list)
|
?(resource_spans=[])
|
||||||
() : export_trace_service_request =
|
() : export_trace_service_request =
|
||||||
let _res = default_export_trace_service_request () in
|
let _res = default_export_trace_service_request () in
|
||||||
set_export_trace_service_request_resource_spans _res resource_spans;
|
set_export_trace_service_request_resource_spans _res resource_spans;
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ type export_trace_service_request = private {
|
||||||
}
|
}
|
||||||
|
|
||||||
type export_trace_partial_success = private {
|
type export_trace_partial_success = private {
|
||||||
mutable _presence: Pbrt.Bitfield.t;
|
mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *)
|
||||||
(** tracking presence for 2 fields *)
|
|
||||||
mutable rejected_spans : int64;
|
mutable rejected_spans : int64;
|
||||||
mutable error_message : string;
|
mutable error_message : string;
|
||||||
}
|
}
|
||||||
|
|
@ -38,7 +37,7 @@ val default_export_trace_service_response : unit -> export_trace_service_respons
|
||||||
(** {2 Make functions} *)
|
(** {2 Make functions} *)
|
||||||
|
|
||||||
val make_export_trace_service_request :
|
val make_export_trace_service_request :
|
||||||
resource_spans:Trace.resource_spans list ->
|
?resource_spans:Trace.resource_spans list ->
|
||||||
unit ->
|
unit ->
|
||||||
export_trace_service_request
|
export_trace_service_request
|
||||||
(** [make_export_trace_service_request … ()] is a builder for type [export_trace_service_request] *)
|
(** [make_export_trace_service_request … ()] is a builder for type [export_trace_service_request] *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue