package opentelemetry
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b635c486d1333cbb7276cc0075d5e01b017d4b37bd5941377ee1be07dfa25a45
sha512=2a19bf4e371ed2751e018c734ead2fd130d378ef0e018cda7b4aa3048af3e0db771fbd78d936199b34164950454bce0f3cb6211455e3647f7b7a85f4649bb22c
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_flags:Trace_flags.t ->
?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
W3C trace flags. Spans without flags get Trace_flags.default.
val create_new :
?kind:kind ->
?trace_flags:Trace_flags.t ->
?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.