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/Trace_flags/index.html

Module Opentelemetry_core.Trace_flagsSource

W3C trace flags.

https://www.w3.org/TR/trace-context-2/#trace-flags

Only the sampled (0x01) and random-trace-id (0x02) flags are defined; other bits are reserved and "Vendors MUST set those to zero", so they are always cleared.

  • since 0.92
Sourcetype t = private int
Sourceval none : t

No flag set

Sourceval sampled : t

Only the sampled flag

Sourceval default : t

sampled and random (0x03). Default for Span.make, and for spans without flags

Sourceval make : sampled:bool -> random:bool -> t
Sourceval of_int : int -> t

Keep only the known flags

Sourceval to_int : t -> int
Sourceval of_int32 : int32 -> t

Keep only the known flags, e.g. from the OTLP flags field

Sourceval to_int32 : t -> int32
Sourceval is_sampled : t -> bool

"When set, the least significant bit (right-most), denotes that the caller may have recorded trace data."

Sourceval is_random : t -> bool

"When set, at least the right-most 7 bytes of the trace-id MUST be selected randomly (or pseudo-randomly)". It must be propagated unchanged for a given trace ID.

Sourceval with_sampled : bool -> t -> t
Sourceval with_random : bool -> t -> t
Sourceval pp : Format.formatter -> t -> unit