instrument_id (instrument v1.0.0)
View SourceTrace and Span ID generation per W3C TraceContext spec.
Provides cryptographically random ID generation and hex encoding/decoding.
Summary
Functions
Generates a random 64-bit span ID. The ID is guaranteed to be non-zero per W3C spec.
Generates a random 128-bit trace ID. The ID is guaranteed to be non-zero per W3C spec.
Converts a hex string to a span ID.
Converts a hex string to a trace ID.
Checks if a span ID is valid (non-zero).
Checks if a trace ID is valid (non-zero).
Converts a span ID to lowercase hex string.
Converts a trace ID to lowercase hex string.
Types
Functions
-spec generate_span_id() -> span_id().
Generates a random 64-bit span ID. The ID is guaranteed to be non-zero per W3C spec.
-spec generate_trace_id() -> trace_id().
Generates a random 128-bit trace ID. The ID is guaranteed to be non-zero per W3C spec.
Converts a hex string to a span ID.
Converts a hex string to a trace ID.
Checks if a span ID is valid (non-zero).
Checks if a trace ID is valid (non-zero).
Converts a span ID to lowercase hex string.
Converts a trace ID to lowercase hex string.