Opentelemetry_lwt.Traceinclude module type of struct include Opentelemetry.Trace endTraces.
See the spec
type span = Opentelemetry.Span.tval 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_spanstype scope = Opentelemetry.Trace.scope = {trace_id : Opentelemetry.Trace_id.t; |
span_id : Opentelemetry.Span_id.t; |
mutable events : Opentelemetry.Event.t list; |
}Scope to be used with with_.
val add_event : scope -> ( unit -> Opentelemetry.Event.t ) -> unitAdd an event to the scope. It will be aggregated into the span.
Note that this takes a function that produces an event, and will only call it if there is an instrumentation backend.
val emit :
?service_name:string ->
?attrs:
(string * [< `Bool of bool | `Int of int | `None | `String of string ])
list ->
span list ->
unit Lwt.tEmit asynchronously
val with_ :
?trace_state:string ->
?service_name:string ->
?attrs:Span.key_value list ->
?kind:Span.kind ->
?trace_id:Trace_id.t ->
?parent:Span.id ->
?links:(Opentelemetry.Trace_id.t * Opentelemetry.Span_id.t * string) list ->
string ->
( Opentelemetry.Trace.scope -> 'a Lwt.t ) ->
'a Lwt.tSync span guard