How mahendra-go/local-llm-instrumentation-tracing-and-replay-platform works
llmtrace observes transformer inference events, then supports live dashboarding or recording and replay. The principal workflow is selecting a synthetic, replay, or llama.cpp source in the CLI; events are captured or loaded, then streamed into the dashboard or written to a trace. Session aggregation supports topology, metrics, attention, and anomaly views. The README documents the dashboard capabilities and capture callback; some internal dashboard wiring is not shown in the excerpts, so those links are limited to documented relationships.
Main entry points: main.cpp CLI dispatcher · dashboard.cpp Interactive dashboard · llama_capture.cpp Llama capture · session.cpp Session state
Components 16
CLI workflow
- CLI dispatcher
src/main.cpp
Event sources
- Synthetic generator
src/source.cpp - Replay stream
src/source.cpp - Llama capture
src/capture/llama_capture.cpp
Event state
- Layer events
src/event.cpp - Bounded buffers
include/llmtrace/ring_buffer.hpp - Topology builder
src/topology.cpp - Session state
src/session.cpp
Trace storage
- Trace reader/writer
src/trace_io.cpp - Trace file
Dashboard
- Interactive dashboard
src/dashboard.cpp - Topology panel
src/dashboard.cpp - Event stream
src/dashboard.cpp - Metrics and alerts
src/dashboard.cpp
Other components
- Engineer
- llama.cpp
Connections 18
- Engineer → CLI dispatcher: selects mode
src/main.cpp - CLI dispatcher → Synthetic generator: constructs source
src/main.cpp - CLI dispatcher → Replay stream: constructs source
src/main.cpp - CLI dispatcher → Llama capture: starts capture
src/main.cpp - Llama capture → llama.cpp: registers callback
README.md - Llama capture → Layer events: emits events
src/capture/llama_capture.cpp - Synthetic generator → Layer events: generates events
- Replay stream → Layer events: replays events
- CLI dispatcher → Trace reader/writer: loads trace
src/main.cpp - CLI dispatcher → Trace reader/writer: writes trace
src/main.cpp - Trace reader/writer → Trace file: reads and writes
- CLI dispatcher → Interactive dashboard: runs dashboard
src/main.cpp - Interactive dashboard → Session state: aggregates stream
README.md - Session state → Bounded buffers: retains events
src/session.cpp - Session state → Topology builder: observes events
src/session.cpp - Interactive dashboard → Topology panel: renders topology
README.md - Interactive dashboard → Event stream: renders events
README.md - Interactive dashboard → Metrics and alerts: renders diagnostics
README.md