Observation
Trace streaming and recording for Vantle
This document describes the Observation system, a peer-to-peer trace streaming framework for Vantle.
Architecture
Observation uses a peer-to-peer model with no central server. Applications stream traces directly to:
-
Files
: Local recording via
log://andchrome://URIs -
Peers
: Remote streaming via
grpc://URIs
Each application decides where to send its traces. See Forge for an example of configuring trace destinations.
Trace
The #[trace]
macro instruments functions for observation.
Usage
# [trace (channels = [core])]
fn view<Source, T>(&self, mut source: T) -> Result<Translation<u8>>
where
T: Translator::<Source, u8>, {
source.view(&*self.filter, &*self.terminator, self.limiter)
}
Channels
Channels filter which spans to emit. Common channels include:
-
core: Core runtime operations -
document: Documentation generation -
hypergraph: Hypergraph evaluation -
matching: Pattern matching -
query: Graph queries