span-file-export

Installation
SKILL.md

Span & Log File Export

Scope (this repo)

  • In scope: VS Code extension client — packages/apex-lsp-vscode-extension and code that runs in the extension host and uses the services extension / enableFileTraces (see src/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): .jsonl on 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).

Installs
1
GitHub Stars
11
First Seen
Sep 2, 2026
span-file-export — forcedotcom/apex-language-support