silk.http.trace.
Opt-in propagation of W3C trace context on HTTP requests.
Import as HttpTrace with import silk.http.trace as HttpTrace.
Public declarations: 3.
inject#
pub effect fn inject<'a>(request: &mut Request<'a>) -> () ! OutOfMemoryError ? &mut AllocatorSets a single traceparent header from the current span, including when it is unsampled.
extract#
pub fn extract<'a>(head: &RequestHead<'a>) -> Option<SpanContext>Returns a valid remote parent from the request head. Duplicate fields are invalid.
serverSpan#
pub fn serverSpan<'a>(head: &RequestHead<'a>, static name: string<'static>) -> SpanGuardOpens a server span and uses a valid incoming traceparent as its remote parent.
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.