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
- Wire
Event - Wire
Server Info - One-shot server-pushed handshake describing the host binary the
client is talking to. Sent as the very first response on every
StartStreamso 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. - Wire
Span
Enums§
- Request
Body - Response
Body - Serve
Error - Errors returned by
serve. - Wire
Field Value - Wire representation of a captured field value. Mirrors
tracing_cache::FieldValuebut collapses the four string variants (Str/SmallString/SharedString/String) to a singleStr(String)— the heap is unavoidable once we cross the network boundary anyway. - Wire
Level - Wire
Level Filter - Wire counterpart to
tracing::level_filters::LevelFilter. IncludesOffbecause the cache-side global level can be fully disabled — distinct fromWireLevel(which is the per-span/event level and therefore can’t be “off”).
Functions§
- serve
- Bind to
addrand serve the console RPC protocol againstcache.