Use file-based span export for AI consumption. Where it lives, how to enable/clear, settings for Node and Web. Use when enabling span file dump, debugging traces for AI, or configuring local observability.
Install
npx skillscat add forcedotcom/salesforcedx-vscode/span-file-export Install via the SkillsCat registry.
Span File Export
Local span export to ~/.sf/vscode-spans/ for AI consumers. Simplified flat JSON Lines format.
Choose One: OTLP vs File
- OTLP (
enableLocalTraces): Grafana/Jaeger UI — for humans - File (
enableFileTraces):.jsonlon disk — for AI agents, Cursor
Use only one at a time.
Where It Lives
All spans in one directory: ~/.sf/vscode-spans/
| Prefix | Path pattern |
|---|---|
| Node | node-{extensionName}-{ISO-timestamp}.jsonl |
| Web | web-{extensionName}-{ISO-timestamp}.jsonl |
Find latest: ls -lt ~/.sf/vscode-spans/
Enable (Desktop)
Settings → search enableFileTraces → check, or:
{ "salesforcedx-vscode-salesforcedx.enableFileTraces": true }Enable (Web / run:web)
Web POSTs to local span file server (port 3003). Server must be running.
- Start server:
npm run spans:server -w salesforcedx-vscode-services - Add to
.esbuild-web-extra-settings.jsonat repo root (gitignored):
{ "salesforcedx-vscode-salesforcedx.enableFileTraces": true }- Run
npm run run:web -w packages/<extension> - If settings don't appear:
rm -rf packages/salesforcedx-vscode-services/.wireit packages/salesforcedx-vscode-services/dist
test:web starts the span file server automatically via wireit service dep.
Clear
rm ~/.sf/vscode-spans/* or rm -rf ~/.sf/vscode-spans/
Format
Simplified flat JSON — one object per line:
{"name":"deploy","traceId":"abc","spanId":"def","parentSpanId":"","durationMs":1234,"status":"OK","startTime":"2026-02-25T10:30:00.000Z","attributes":{"componentCount":"5"}}Parse with JSON.parse per line.