You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example demonstrates the `trace_recorder` library: an in-memory recording system for function call traces.
4
+
5
+
Instead of streaming traces to a sink, the `VectorTraceRecorder` buffers all trace events and can export them as a JSON array for inspection or analysis.
6
+
7
+
This is useful for:
8
+
- Logging complete execution traces for debugging
9
+
- Collecting performance metrics
10
+
- Auditing function calls for compliance
11
+
- Integration with external tracing systems
12
+
13
+
## Build
14
+
15
+
```powershell
16
+
cmake -B build -S .
17
+
cmake --build build --target trace_recorder_demo
18
+
```
19
+
20
+
## Run
21
+
22
+
```powershell
23
+
.\build\trace_recorder_demo.exe
24
+
```
25
+
26
+
Linux/macOS:
27
+
28
+
```bash
29
+
./build/trace_recorder_demo
30
+
```
31
+
32
+
## Features Demonstrated
33
+
34
+
- Record all function invocations and results
35
+
- Export recorded traces as structured JSON
36
+
- Clear trace buffer between operations
37
+
- Inspect both successful and failed function calls
0 commit comments