package opentelemetry

  1. Overview
  2. Docs
Core library for instrumentation and serialization for https://opentelemetry.io

Install

dune-project
 Dependency

Authors

Maintainers

Sources

opentelemetry-0.92.tbz
sha256=b635c486d1333cbb7276cc0075d5e01b017d4b37bd5941377ee1be07dfa25a45
sha512=2a19bf4e371ed2751e018c734ead2fd130d378ef0e018cda7b4aa3048af3e0db771fbd78d936199b34164950454bce0f3cb6211455e3647f7b7a85f4649bb22c

doc/opentelemetry.core/Opentelemetry_core/Span_ctx/index.html

Module Opentelemetry_core.Span_ctxSource

Span context. This bundles up a trace ID and parent ID.

https://opentelemetry.io/docs/specs/otel/trace/api/#spancontext

  • since 0.7
Sourcetype t
Sourcemodule Flags = Trace_flags
Sourceval make : ?trace_state:string -> trace_flags:Trace_flags.t -> trace_id:Trace_id.t -> parent_id:Span_id.t -> unit -> t
  • parameter trace_flags

    W3C trace flags. They must reflect the trace's actual sampling decision and trace ID randomness, so there is no default. Since 0.92

  • parameter trace_state

    W3C tracestate value, since 0.92

Sourceval dummy : t

Invalid span context, to be used as a placeholder

Sourceval is_valid : t -> bool

Are the span ID and trace ID valid (ie non-zero)?

Sourceval trace_id : t -> Trace_id.t
Sourceval parent_id : t -> Span_id.t
Sourceval trace_flags : t -> Trace_flags.t

W3C trace flags.

  • since 0.92
Sourceval sampled : t -> bool

Trace_flags.is_sampled (trace_flags self)

Sourceval trace_state : t -> string

W3C tracestate value, "" if absent.

  • since 0.92
Sourceval to_w3c_trace_context : t -> bytes
Sourceval of_w3c_trace_context : bytes -> (t, string) result
Sourceval of_w3c_trace_context_exn : bytes -> t
Sourceval k_ambient : t Hmap.key

Hmap key to carry around a Span_ctx.t, e.g. to remember what the current parent span is.

  • since 0.8