rapace-tracing
Tracing subscriber that forwards spans and events over rapace RPC.
This crate enables plugins to use tracing normally while having all spans and events collected in the host process via rapace RPC.
Architecture
┌─────────────────────────────────────────────────────────────────────────┐
│ PLUGIN PROCESS │
│ │
│ tracing::info!("hello") ──► RapaceTracingLayer ──► TracingSinkClient ─┤
│ ▲ │
│ │ │
│ TracingConfigServer ◄──────────────────────────┤
│ (applies host's filter) │
└────────────────────────────────────────────────────────────────────────┬┘
│
rapace transport (TCP/Unix/SHM) │
│
┌────────────────────────────────────────────────────────────────────────┴┐
│ HOST PROCESS │
│ │
│ TracingSinkServer ──► HostTracingSink ──► tracing_subscriber / logs │
│ │
│ TracingConfigClient ──► pushes filter changes to plugin │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Filter Flow
The host is the single source of truth for log filtering:
- Host decides what log levels/targets are enabled
- Host pushes filter config to plugin via
TracingConfig::set_filter - Plugin applies the filter locally (avoids spam over RPC)
- When host changes filters dynamically, it pushes the update
Example
// Plugin side: install the layer
let layer = new;
registry.with.init;
// Now all tracing calls are forwarded to the host
info!;
License
MIT OR Apache-2.0