mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
Changed trace output from object format to array format for better
compactness and easier filtering.
Old format:
```json
{"ns":"fs","ts":123,"data":{"call":"writeFile","path":"test.txt"}}
```
New format:
```json
["fs",123,"writeFile",{"path":"test.txt"}]
```
Benefits:
- More compact (saves ~40% space)
- Easier to filter with jq: select(.[0] == "fs" and .[2] == "writeFile")
- Faster to parse (arrays vs objects)
- "call" field promoted to top level as operation name
Array structure:
- [0] = namespace (fs, fetch, subprocess, etc.)
- [1] = timestamp in milliseconds
- [2] = operation name (writeFile, spawn, request, etc.)
- [3] = operation-specific data object
Updated:
- output.zig tracer implementation to output array format
- All 19 tests updated for new format
- All tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>