Skip to main content

Crate tracing_console_host

Crate tracing_console_host 

Source
Expand description

protosocket-rpc host that streams closed spans from a tracing-cache::SpanCache to console clients over messagepack.

Usage:

let (cache, driver) = tracing_cache::SpanCache::new(16384);
let cache = std::sync::Arc::new(cache);
tokio::spawn(driver.run());
tracing_console_host::serve(cache, "127.0.0.1:7777".parse()?).await?;

Structs§

Request
Response
WireEvent
WireServerInfo
One-shot server-pushed handshake describing the host binary the client is talking to. Sent as the very first response on every StartStream so the client can verify it’s connected to a compatible version (the host crate’s version is workspace-pinned to the same number as the client binary). Kept as a struct so future fields (build sha, supported features, …) don’t require a wire-protocol break.
WireSpan

Enums§

RequestBody
ResponseBody
ServeError
Errors returned by serve.
WireFieldValue
Wire representation of a captured field value. Mirrors tracing_cache::FieldValue but collapses the four string variants (Str / SmallString / SharedString / String) to a single Str(String) — the heap is unavoidable once we cross the network boundary anyway.
WireLevel
WireLevelFilter
Wire counterpart to tracing::level_filters::LevelFilter. Includes Off because the cache-side global level can be fully disabled — distinct from WireLevel (which is the per-span/event level and therefore can’t be “off”).

Functions§

serve
Bind to addr and serve the console RPC protocol against cache.