Expand description
BroadcastTracingLayer — a tracing_subscriber::Layer that fans
every emitted tracing::Event into a tokio::sync::broadcast
channel as a TracingFrame (timestamp / level / target / message
/ structured fields).
The layer composes alongside the host’s normal subscriber stack
(tracing_subscriber::fmt::Layer writing to stderr is unaffected);
it adds one more sink without changing user-visible logging. Each
subscriber gets its own broadcast::Receiver with independent
backlog tracking; slow subscribers see RecvError::Lagged(n) and
resume from the next available frame, which the operator-facing
transport can surface as a sentinel.
TracingFrame derives serde::Serialize / Deserialize, so the
transport (NDJSON, websocket text frames, JSON-RPC, …) is just
serde_json::to_string(&frame).
Structs§
- Broadcast
Tracing Layer - Tracing layer that broadcasts each event as a
TracingFrame. - Tracing
Frame - Wire shape for a single tracing event.
Constants§
- DEFAULT_
BROADCAST_ CAP - Default broadcast channel capacity for tracing frames. Tracing
events are lower-volume than flow logs (one per log line vs one
per per-step trajectory), so the channel is sized smaller —
spec/flow-model.md§ Flow log verbosity owns the per-stream sizing rationale. Override viaVANE_TRACE_BROADCAST_CAP. - ENV_
BROADCAST_ CAP - Env var that overrides
DEFAULT_BROADCAST_CAPat construction time. Values that fail to parse or evaluate to 0 fall back to the default — same shape as the rest of the daemon’sVANE_*knobs.