package opentelemetry

  1. Overview
  2. Docs

Types

type span_span_kind =
  1. | Span_kind_unspecified
  2. | Span_kind_internal
  3. | Span_kind_server
  4. | Span_kind_client
  5. | Span_kind_producer
  6. | Span_kind_consumer
type span_event = {
  1. time_unix_nano : int64;
  2. name : string;
  3. attributes : Opentelemetry__.Common_types.key_value list;
  4. dropped_attributes_count : int32;
}
type status_status_code =
  1. | Status_code_unset
  2. | Status_code_ok
  3. | Status_code_error
type status = {
  1. message : string;
  2. code : status_status_code;
}
type span = {
  1. trace_id : bytes;
  2. span_id : bytes;
  3. trace_state : string;
  4. parent_span_id : bytes;
  5. name : string;
  6. kind : span_span_kind;
  7. start_time_unix_nano : int64;
  8. end_time_unix_nano : int64;
  9. attributes : Opentelemetry__.Common_types.key_value list;
  10. dropped_attributes_count : int32;
  11. events : span_event list;
  12. dropped_events_count : int32;
  13. status : status option;
}
type scope_spans = {
  1. scope : Opentelemetry__.Common_types.instrumentation_scope option;
  2. spans : span list;
  3. schema_url : string;
}
type resource_spans = {
  1. resource : Opentelemetry__.Resource_types.resource option;
  2. scope_spans : scope_spans list;
  3. schema_url : string;
}
type traces_data = {
  1. resource_spans : resource_spans list;
}

Default values

val default_span_span_kind : unit -> span_span_kind

default_span_span_kind () is the default value for type span_span_kind

val default_span_event : ?time_unix_nano:int64 -> ?name:string -> ?attributes:Opentelemetry__.Common_types.key_value list -> ?dropped_attributes_count:int32 -> unit -> span_event

default_span_event () is the default value for type span_event

default_span_link () is the default value for type span_link

val default_status_status_code : unit -> status_status_code

default_status_status_code () is the default value for type status_status_code

val default_status : ?message:string -> ?code:status_status_code -> unit -> status

default_status () is the default value for type status

val default_span : ?trace_id:bytes -> ?span_id:bytes -> ?trace_state:string -> ?parent_span_id:bytes -> ?name:string -> ?kind:span_span_kind -> ?start_time_unix_nano:int64 -> ?end_time_unix_nano:int64 -> ?attributes:Opentelemetry__.Common_types.key_value list -> ?dropped_attributes_count:int32 -> ?events:span_event list -> ?dropped_events_count:int32 -> ?links:span_link list -> ?dropped_links_count:int32 -> ?status:status option -> unit -> span

default_span () is the default value for type span

val default_scope_spans : ?scope:Opentelemetry__.Common_types.instrumentation_scope option -> ?spans:span list -> ?schema_url:string -> unit -> scope_spans

default_scope_spans () is the default value for type scope_spans

val default_resource_spans : ?resource:Opentelemetry__.Resource_types.resource option -> ?scope_spans:scope_spans list -> ?schema_url:string -> unit -> resource_spans

default_resource_spans () is the default value for type resource_spans

val default_traces_data : ?resource_spans:resource_spans list -> unit -> traces_data

default_traces_data () is the default value for type traces_data

Formatters

val pp_span_span_kind : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.span_span_kind -> unit

pp_span_span_kind v formats v

val pp_span_event : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.span_event -> unit

pp_span_event v formats v

pp_span_link v formats v

val pp_status_status_code : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.status_status_code -> unit

pp_status_status_code v formats v

val pp_status : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.status -> unit

pp_status v formats v

val pp_span : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.span -> unit

pp_span v formats v

val pp_scope_spans : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.scope_spans -> unit

pp_scope_spans v formats v

val pp_resource_spans : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.resource_spans -> unit

pp_resource_spans v formats v

val pp_traces_data : Stdlib.Format.formatter -> Opentelemetry__.Trace_types.traces_data -> unit

pp_traces_data v formats v

Protobuf Encoding

val encode_span_span_kind : Opentelemetry__.Trace_types.span_span_kind -> Pbrt.Encoder.t -> unit

encode_span_span_kind v encoder encodes v with the given encoder

val encode_span_event : Opentelemetry__.Trace_types.span_event -> Pbrt.Encoder.t -> unit

encode_span_event v encoder encodes v with the given encoder

encode_span_link v encoder encodes v with the given encoder

val encode_status_status_code : Opentelemetry__.Trace_types.status_status_code -> Pbrt.Encoder.t -> unit

encode_status_status_code v encoder encodes v with the given encoder

val encode_status : Opentelemetry__.Trace_types.status -> Pbrt.Encoder.t -> unit

encode_status v encoder encodes v with the given encoder

val encode_span : Opentelemetry__.Trace_types.span -> Pbrt.Encoder.t -> unit

encode_span v encoder encodes v with the given encoder

val encode_scope_spans : Opentelemetry__.Trace_types.scope_spans -> Pbrt.Encoder.t -> unit

encode_scope_spans v encoder encodes v with the given encoder

val encode_resource_spans : Opentelemetry__.Trace_types.resource_spans -> Pbrt.Encoder.t -> unit

encode_resource_spans v encoder encodes v with the given encoder

val encode_traces_data : Opentelemetry__.Trace_types.traces_data -> Pbrt.Encoder.t -> unit

encode_traces_data v encoder encodes v with the given encoder

Protobuf Decoding

val decode_span_span_kind : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.span_span_kind

decode_span_span_kind decoder decodes a span_span_kind value from decoder

val decode_span_event : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.span_event

decode_span_event decoder decodes a span_event value from decoder

decode_span_link decoder decodes a span_link value from decoder

val decode_status_status_code : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.status_status_code

decode_status_status_code decoder decodes a status_status_code value from decoder

val decode_status : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.status

decode_status decoder decodes a status value from decoder

val decode_span : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.span

decode_span decoder decodes a span value from decoder

val decode_scope_spans : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.scope_spans

decode_scope_spans decoder decodes a scope_spans value from decoder

val decode_resource_spans : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.resource_spans

decode_resource_spans decoder decodes a resource_spans value from decoder

val decode_traces_data : Pbrt.Decoder.t -> Opentelemetry__.Trace_types.traces_data

decode_traces_data decoder decodes a traces_data value from decoder

OCaml

Innovation. Community. Security.