Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Opentelemetry.Trace end
Traces.
See the spec
type span = Opentelemetry.Span.t
val make_resource_spans :
?service_name:string ->
?attrs:
(string * [< `Bool of bool | `Int of int | `None | `String of string ])
list ->
Opentelemetry.Proto.Trace.span list ->
Opentelemetry.Proto.Trace.resource_spans
val emit :
?service_name:string ->
?attrs:
(string * [< `Bool of bool | `Int of int | `None | `String of string ])
list ->
span list ->
unit
Sync emitter.
This instructs the collector to forward the spans to some backend at a later point.
NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.
type scope = Opentelemetry.Scope.t = {
trace_id : Opentelemetry.Trace_id.t;
span_id : Opentelemetry.Span_id.t;
mutable events : Opentelemetry.Event.t list;
mutable attrs : Opentelemetry.Span.key_value list;
}
val add_event :
Opentelemetry.Scope.t ->
(unit -> Opentelemetry.Event.t) ->
unit
val add_attrs :
Opentelemetry.Scope.t ->
(unit -> Opentelemetry.key_value list) ->
unit
val with_ :
?trace_state:string ->
?service_name:string ->
?attrs:Opentelemetry.Span.key_value list ->
?kind:Span.kind ->
?trace_id:Trace_id.t ->
?parent:Span.id ->
?scope:scope ->
?links:Opentelemetry.Span_link.t list ->
string ->
(Opentelemetry.Scope.t -> 'a Lwt.t) ->
'a Lwt.t
Sync span guard