Module Opentelemetry_proto.Common

Code for common.proto

Types

type any_value =
  1. | String_value of string
  2. | Bool_value of bool
  3. | Int_value of int64
  4. | Double_value of float
  5. | Array_value of array_value
  6. | Kvlist_value of key_value_list
  7. | Bytes_value of bytes
and array_value = private {
  1. mutable values : any_value list;
}
and key_value_list = private {
  1. mutable values : key_value list;
}
and key_value = private {
  1. mutable _presence : Pbrt.Bitfield.t;
    (*

    presence for 1 fields

    *)
  2. mutable key : string;
  3. mutable value : any_value option;
}
type instrumentation_scope = private {
  1. mutable _presence : Pbrt.Bitfield.t;
    (*

    presence for 3 fields

    *)
  2. mutable name : string;
  3. mutable version : string;
  4. mutable attributes : key_value list;
  5. mutable dropped_attributes_count : int32;
}
type entity_ref = private {
  1. mutable _presence : Pbrt.Bitfield.t;
    (*

    presence for 2 fields

    *)
  2. mutable schema_url : string;
  3. mutable type_ : string;
  4. mutable id_keys : string list;
  5. mutable description_keys : string list;
}

Basic values

val default_any_value : unit -> any_value

default_any_value () is a new empty value for type any_value

val default_array_value : unit -> array_value

default_array_value () is a new empty value for type array_value

val default_key_value_list : unit -> key_value_list

default_key_value_list () is a new empty value for type key_value_list

val default_key_value : unit -> key_value

default_key_value () is a new empty value for type key_value

val default_instrumentation_scope : unit -> instrumentation_scope

default_instrumentation_scope () is a new empty value for type instrumentation_scope

val default_entity_ref : unit -> entity_ref

default_entity_ref () is a new empty value for type entity_ref

Make functions

val make_array_value : ?values:any_value list -> unit -> array_value

make_array_value … () is a builder for type array_value

val copy_array_value : array_value -> array_value
val array_value_set_values : array_value -> any_value list -> unit

set field values in array_value

val make_key_value_list : ?values:key_value list -> unit -> key_value_list

make_key_value_list … () is a builder for type key_value_list

val copy_key_value_list : key_value_list -> key_value_list
val key_value_list_set_values : key_value_list -> key_value list -> unit

set field values in key_value_list

val make_key_value : ?key:string -> ?value:any_value -> unit -> key_value

make_key_value … () is a builder for type key_value

val copy_key_value : key_value -> key_value
val key_value_has_key : key_value -> bool

presence of field "key" in key_value

val key_value_set_key : key_value -> string -> unit

set field key in key_value

val key_value_set_value : key_value -> any_value -> unit

set field value in key_value

val make_instrumentation_scope : ?name:string -> ?version:string -> ?attributes:key_value list -> ?dropped_attributes_count:int32 -> unit -> instrumentation_scope

make_instrumentation_scope … () is a builder for type instrumentation_scope

val copy_instrumentation_scope : instrumentation_scope -> instrumentation_scope
val instrumentation_scope_has_name : instrumentation_scope -> bool

presence of field "name" in instrumentation_scope

val instrumentation_scope_set_name : instrumentation_scope -> string -> unit

set field name in instrumentation_scope

val instrumentation_scope_has_version : instrumentation_scope -> bool

presence of field "version" in instrumentation_scope

val instrumentation_scope_set_version : instrumentation_scope -> string -> unit

set field version in instrumentation_scope

val instrumentation_scope_set_attributes : instrumentation_scope -> key_value list -> unit

set field attributes in instrumentation_scope

val instrumentation_scope_has_dropped_attributes_count : instrumentation_scope -> bool

presence of field "dropped_attributes_count" in instrumentation_scope

val instrumentation_scope_set_dropped_attributes_count : instrumentation_scope -> int32 -> unit

set field dropped_attributes_count in instrumentation_scope

val make_entity_ref : ?schema_url:string -> ?type_:string -> ?id_keys:string list -> ?description_keys:string list -> unit -> entity_ref

make_entity_ref … () is a builder for type entity_ref

val copy_entity_ref : entity_ref -> entity_ref
val entity_ref_has_schema_url : entity_ref -> bool

presence of field "schema_url" in entity_ref

val entity_ref_set_schema_url : entity_ref -> string -> unit

set field schema_url in entity_ref

val entity_ref_has_type_ : entity_ref -> bool

presence of field "type_" in entity_ref

val entity_ref_set_type_ : entity_ref -> string -> unit

set field type_ in entity_ref

val entity_ref_set_id_keys : entity_ref -> string list -> unit

set field id_keys in entity_ref

val entity_ref_set_description_keys : entity_ref -> string list -> unit

set field description_keys in entity_ref

Formatters

val pp_any_value : Stdlib.Format.formatter -> any_value -> unit

pp_any_value v formats v

val pp_array_value : Stdlib.Format.formatter -> array_value -> unit

pp_array_value v formats v

val pp_key_value_list : Stdlib.Format.formatter -> key_value_list -> unit

pp_key_value_list v formats v

val pp_key_value : Stdlib.Format.formatter -> key_value -> unit

pp_key_value v formats v

val pp_instrumentation_scope : Stdlib.Format.formatter -> instrumentation_scope -> unit

pp_instrumentation_scope v formats v

val pp_entity_ref : Stdlib.Format.formatter -> entity_ref -> unit

pp_entity_ref v formats v

Protobuf Encoding

val encode_pb_any_value : any_value -> Pbrt.Encoder.t -> unit

encode_pb_any_value v encoder encodes v with the given encoder

val encode_pb_array_value : array_value -> Pbrt.Encoder.t -> unit

encode_pb_array_value v encoder encodes v with the given encoder

val encode_pb_key_value_list : key_value_list -> Pbrt.Encoder.t -> unit

encode_pb_key_value_list v encoder encodes v with the given encoder

val encode_pb_key_value : key_value -> Pbrt.Encoder.t -> unit

encode_pb_key_value v encoder encodes v with the given encoder

val encode_pb_instrumentation_scope : instrumentation_scope -> Pbrt.Encoder.t -> unit

encode_pb_instrumentation_scope v encoder encodes v with the given encoder

val encode_pb_entity_ref : entity_ref -> Pbrt.Encoder.t -> unit

encode_pb_entity_ref v encoder encodes v with the given encoder

Protobuf Decoding

val decode_pb_any_value : Pbrt.Decoder.t -> any_value

decode_pb_any_value decoder decodes a any_value binary value from decoder

val decode_pb_array_value : Pbrt.Decoder.t -> array_value

decode_pb_array_value decoder decodes a array_value binary value from decoder

val decode_pb_key_value_list : Pbrt.Decoder.t -> key_value_list

decode_pb_key_value_list decoder decodes a key_value_list binary value from decoder

val decode_pb_key_value : Pbrt.Decoder.t -> key_value

decode_pb_key_value decoder decodes a key_value binary value from decoder

val decode_pb_instrumentation_scope : Pbrt.Decoder.t -> instrumentation_scope

decode_pb_instrumentation_scope decoder decodes a instrumentation_scope binary value from decoder

val decode_pb_entity_ref : Pbrt.Decoder.t -> entity_ref

decode_pb_entity_ref decoder decodes a entity_ref binary value from decoder