span-file-export
Installation
SKILL.md
Span & Log File Export
Scope (this repo)
- In scope: VS Code extension client —
packages/apex-lsp-vscode-extensionand code that runs in the extension host and uses the services extension /enableFileTraces(seesrc/observability/extensionTracing.ts). - Out of scope for default guidance: Language server and parser packages (
packages/apex-parser-ast,packages/apex-ls, etc.) — do not treat file-span export as a requirement there unless product explicitly adds tracing. Server-side LSP work stays focused on protocol and semantics.
Local OTLP export to ~/.sf/vscode-spans/ for AI consumers. Spans and log records interleaved in one JSONL file. The actual exporter and record format come from the shared @salesforce/vscode-services SDK layer (SdkLayerFor(context)), which the extension obtains from the salesforce.salesforcedx-vscode-services extension.
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.
Settings Required
These settings live in the shared salesforcedx-vscode-salesforcedx section provided by the services extension (not the apex section).