package opentelemetry
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c3989bb678f57e5276209d3c60afb29cdca33122288de55e591fbbe2e50a662c
sha512=ba8339256c9b2d8c99c8304991a3047f280a01e492add4cf82bf1d43dfa51e790366c09c6901c0501b8b8e1f810c6e128e33dd33542d785013407f642ade4eea
doc/opentelemetry.core/Opentelemetry_core/Span/index.html
Module Opentelemetry_core.SpanSource
Spans.
A Span is the workhorse of traces, it indicates an operation that took place over a given span of time (indicated by start_time and end_time) as part of a hierarchical trace. All spans in a given trace are bound by the use of the same Trace_id.t.
val make :
?kind:kind ->
?trace_state:string ->
?attrs:key_value list ->
?events:Event.t list ->
?status:Opentelemetry_core.Common_.Proto.Trace.status ->
trace_id:Trace_id.t ->
id:Span_id.t ->
?parent:id ->
?links:Span_link.t list ->
start_time:Timestamp_ns.t ->
end_time:Timestamp_ns.t ->
string ->
tmake ~trace_id ~id name creates a new span
val create_new :
?kind:kind ->
?id:Span_id.t ->
?trace_state:string ->
?attrs:key_value list ->
?events:Event.t list ->
?status:Opentelemetry_core.Common_.Proto.Trace.status ->
trace_id:Trace_id.t ->
?parent:id ->
?links:Span_link.t list ->
start_time:Timestamp_ns.t ->
end_time:Timestamp_ns.t ->
string ->
tTurn the scope into a span link
Turn the scope into a span context
Add 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.
Record an exception occurring inside the span. This creates a span event and also sets the span status to error.
Add links to the scope. It will be aggregated into the span.
Note that this takes a function that produces links, and will only call it if there is an instrumentation backend.
set the span status.
Note that this function will be called only if there is an instrumentation backend.
Set the span's kind.
Default span kind in make and create_new.
This will be used in all spans that do not specify ~kind explicitly; it is set to "internal", following directions from the .proto file. It can be convenient to set "client" or "server" uniformly in here.
Context key to carry around a Span.t in ambient context.