Module Opentelemetry_proto.Resource

Code for resource.proto

Types

type resource = private {
  1. mutable _presence : Pbrt.Bitfield.t;
    (*

    presence for 1 fields

    *)
  2. mutable attributes : Common.key_value list;
  3. mutable dropped_attributes_count : int32;
  4. mutable entity_refs : Common.entity_ref list;
}

Basic values

val default_resource : unit -> resource

default_resource () is a new empty value for type resource

Make functions

val make_resource : ?attributes:Common.key_value list -> ?dropped_attributes_count:int32 -> ?entity_refs:Common.entity_ref list -> unit -> resource

make_resource … () is a builder for type resource

val copy_resource : resource -> resource
val resource_set_attributes : resource -> Common.key_value list -> unit

set field attributes in resource

val resource_has_dropped_attributes_count : resource -> bool

presence of field "dropped_attributes_count" in resource

val resource_set_dropped_attributes_count : resource -> int32 -> unit

set field dropped_attributes_count in resource

val resource_set_entity_refs : resource -> Common.entity_ref list -> unit

set field entity_refs in resource

Formatters

val pp_resource : Stdlib.Format.formatter -> resource -> unit

pp_resource v formats v

Protobuf Encoding

val encode_pb_resource : resource -> Pbrt.Encoder.t -> unit

encode_pb_resource v encoder encodes v with the given encoder

Protobuf Decoding

val decode_pb_resource : Pbrt.Decoder.t -> resource

decode_pb_resource decoder decodes a resource binary value from decoder