opentelemetry

Instrumentation for https://opentelemetry.io
Library opentelemetry
Module Opentelemetry . Span
type id = Span_id.t
type nonrec kind = Proto.Trace.span_span_kind =
| Span_kind_unspecified
| Span_kind_internal
| Span_kind_server
| Span_kind_client
| Span_kind_producer
| Span_kind_consumer
type nonrec status_code = Proto.Trace.status_status_code =
| Status_code_unset
| Status_code_ok
| Status_code_error
type nonrec status = Proto.Trace.status = {
message : string;
code : status_code;
}
val id : t -> Span_id.t
type key_value = string * [ `Int of int | `String of string | `Bool of bool | `None ]
val create : ?kind:kind -> ?id:id -> ?trace_state:string -> ?attrs:key_value list -> ?events:Event.t list -> ?status:status -> trace_id:Trace_id.t -> ?parent:id -> ?links:(Trace_id.t * Span_id.t * string) list -> start_time:Timestamp_ns.t -> end_time:Timestamp_ns.t -> string -> t * id

create ~trace_id name creates a new span with its unique ID.

  • parameter trace_id

    the trace this belongs to

  • parameter parent

    parent span, if any

  • parameter links

    list of links to other spans, each with their trace state (see w3.org)