Module Opentelemetry_proto.ResourceSource

Code for resource.proto

Types

Sourcetype 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

Sourceval default_resource : unit -> resource

default_resource () is a new empty value for type resource

Make functions

Sourceval 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

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

set field attributes in resource

Sourceval resource_has_dropped_attributes_count : resource -> bool

presence of field "dropped_attributes_count" in resource

Sourceval resource_set_dropped_attributes_count : resource -> int32 -> unit

set field dropped_attributes_count in resource

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

set field entity_refs in resource

Formatters

Sourceval pp_resource : Format.formatter -> resource -> unit

pp_resource v formats v

Protobuf Encoding

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

encode_pb_resource v encoder encodes v with the given encoder

Protobuf Decoding

Sourceval decode_pb_resource : Pbrt.Decoder.t -> resource

decode_pb_resource decoder decodes a resource binary value from decoder

Protobuf YoJson Encoding

Sourceval encode_json_resource : resource -> Yojson.Basic.t

encode_json_resource v encoder encodes v to to json

JSON Decoding

Sourceval decode_json_resource : Yojson.Basic.t -> resource

decode_json_resource decoder decodes a resource value from decoder