silk.trace.context.
The trace identifiers and flags that cross process and execution boundaries.
Import as SpanContext with import silk.trace.context { SpanContext }.
Public declarations: 4.
SpanContext#
pub struct SpanContextThe 128-bit trace ID, 64-bit span ID and W3C trace flags of one span.
Field traceHigh#
pub traceHigh: u64High half of the trace identifier in network byte order.
Field traceLow#
pub traceLow: u64Low half of the trace identifier in network byte order.
Field span#
pub span: u64The span identifier, nonzero for a valid context.
Field flags#
pub flags: u8The W3C trace flags. Bit zero is the sampled flag.
Implementation Copy for SpanContext#
impl Copy for SpanContextTraceparent#
pub struct TraceparentAn owned version 00 W3C traceparent header value.
Implementation Traceparent#
impl TraceparentMethod view#
pub fn view(self: &Self) -> stringBorrows the header as lowercase ASCII text.
traceparent#
pub fn traceparent(context: &SpanContext) -> TraceparentEncodes a valid context into the 55 bytes of a version 00 traceparent.
parseTraceparent#
pub fn parseTraceparent(text: string) -> Option<SpanContext>Parses a W3C traceparent header. A later version may append fields after a hyphen.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.