package opentelemetry
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=30f344e7168a793d02c12d69c0f566b06eb963f52db3321e415ef6c5cd3d504d
sha512=19160da37cab59a23333d815baa67035f666e700a386953ec9957c685a0b72fa87919bac6a6651e50b1619773b3be7170bcc067c2d5316436b988bcf8d18dcba
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.