span-file-export
Skill1k starsChanged 25 days agoBSD-3-ClauseView on GitHub
Use file-based span/log export for AI consumption. Where it lives, how to enable/clear, record format for Node and Web. Use when enabling span file dump, debugging traces for AI, or configuring local observability.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about forcedotcom/salesforcedx-vscode
- prettier/prettier-vscode“Couldn't resolve parser "json-stringify"”GitHub · Jun 5, 2018 · 23 reactions
- Stack Overflow“VSCode / Salesforce - Deploy Source to Org very slow to complete, although actual deployment is fast?”Stack Overflow · Jun 26, 2023 · 4 votes
- xixiaofinland/sf.nvim“Debugging functionality”GitHub · Oct 1, 2024 · 3 reactions
- EclipseFdn/open-vsx.org“Claiming namespace salesforce”GitHub · May 3, 2023 · 2 reactions
- forcedotcom/salesforcedx-apex“fix: set correct exit codes on failure”GitHub · Apr 23, 2021 · 2 reactions
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub and Stack Overflow (52 times).
On GitHub · 50
- Jun 5, 2018Couldn't resolve parser "json-stringify" — prettier/prettier-vscode23 reactions · 6 comments
- Oct 1, 2024Debugging functionality — xixiaofinland/sf.nvim3 reactions · 14 comments
- May 3, 2023Claiming namespace salesforce — EclipseFdn/open-vsx.org2 reactions · 21 comments
- Apr 23, 2021fix: set correct exit codes on failure — forcedotcom/salesforcedx-apex2 reactions
- Sep 11, 2024E2E tests fail in VSCode version 1.93.0 with "target window already closed" when running "Developer: Reload Window" — webdriverio-community/wdio-vscode-service1 reaction · 11 comments
45 more on GitHub
- Sep 30, 2020Trigger completions on specific characters — forcedotcom/lightning-language-server1 reaction · 2 comments
- Jun 25, 2019Source commands do not display error information — forcedotcom/cli1 reaction · 34 comments
- Aug 27, 2018Inform extensions that call 'vscode.openFolder' with file URIs created with URI.parse — microsoft/vscode1 reaction
- Aug 3, 2017Show externalised strings in extension editor contributions tab — microsoft/vscode1 reaction · 8 comments
- Nov 6, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 5 updates — certinia/debug-log-analyzer0 reactions
- Nov 5, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.8.0 → 68.10.0 — sudosubin/agents.nix0 reactions
- Nov 5, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 4 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Nov 4, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.8.0 → 68.10.0 — sudosubin/agents.nix0 reactions
- Nov 4, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 2 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 29, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.6.1 → 68.8.0 — sudosubin/agents.nix0 reactions
- Oct 29, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.6.1 → 68.8.0 — sudosubin/agents.nix0 reactions
- Oct 27, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.6.0 → 68.6.1 — sudosubin/agents.nix0 reactions
- Oct 27, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.6.0 → 68.6.1 — sudosubin/agents.nix0 reactions
- Oct 27, 2026build(deps-dev): bump @salesforce/playwright-vscode-ext from 1.7.0 to 1.7.1 in the development-dependencies group across 1 directory — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 26, 2026build(deps-dev): bump @salesforce/playwright-vscode-ext from 1.7.0 to 1.7.1 in the development-dependencies group across 1 directory — certinia/debug-log-analyzer0 reactions · 2 comments
- Oct 22, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 10 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 21, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.4.0 → 68.6.0 — sudosubin/agents.nix0 reactions
- Oct 21, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.4.0 → 68.6.0 — sudosubin/agents.nix0 reactions
- Oct 21, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 8 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 19, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 7 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 16, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.2.0 → 68.4.0 — sudosubin/agents.nix0 reactions
- Oct 16, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.2.0 → 68.4.0 — sudosubin/agents.nix0 reactions
- Oct 16, 2026build(deps-dev): bump @salesforce/vscode-services from 67.20.0 to 67.27.5 — forcedotcom/apex-language-support0 reactions · 2 comments
- Oct 16, 2026feat(git): replace isomorphic-git with Effect Git - W-22711959 — forcedotcom/source-tracking0 reactions · 3 comments
- Oct 16, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 4 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 14, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 2 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 14, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 67.26.0 → 68.2.0 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 67.26.0 → 68.2.0 — sudosubin/agents.nix0 reactions
- Oct 12, 2026build(deps-dev): bump @salesforce/vscode-services from 67.26.0 to 67.27.1 in the development-dependencies group — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 4, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: init at 67.26.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 67.20.0 → 67.26.0 — sudosubin/agents.nix0 reactions
- Sep 27, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: init at 67.20.0 — sudosubin/agents.nix0 reactions
- Sep 25, 2026build(deps-dev): bump @salesforce/vscode-services from 67.17.18 to 67.20.0 — forcedotcom/apex-language-support0 reactions · 1 comment
- Sep 24, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 16 updates — certinia/debug-log-analyzer0 reactions
- Sep 18, 2026build(deps-dev): bump @salesforce/vscode-services from 67.15.0 to 67.17.4 — forcedotcom/apex-language-support0 reactions · 1 comment
- Sep 17, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 14 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Sep 11, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 9 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Aug 28, 2026build(deps-dev): bump @salesforce/vscode-services from 67.10.0 to 67.13.3 — forcedotcom/apex-language-support0 reactions
- Aug 24, 2026Use Org Metadata Catalog for find-missing-artifact org lookups - W-23971749 — forcedotcom/apex-language-support0 reactions · 3 comments
- Aug 21, 2026build(deps-dev): bump @salesforce/vscode-services from 67.7.1 to 67.10.0 — forcedotcom/apex-language-support0 reactions
- Aug 19, 2026feat: export stdValueSetRegistry.json from main index.ts to be called properly outside this repo - W-23802414 — forcedotcom/source-deploy-retrieve0 reactions
- Jul 31, 2026build(deps-dev): bump @salesforce/vscode-services from 67.6.0 to 67.7.1 — forcedotcom/apex-language-support0 reactions
- Jul 24, 2026build(deps): bump @salesforce/vscode-i18n from 66.7.1 to 66.8.0 — forcedotcom/apex-language-support0 reactions
- Jul 8, 2026Support new SFDX: Create OpenAPI Document from This Class (Beta) — RoseSilverSoftware/IlluminatedCloud0 reactions
- Jul 8, 2026Agentforce for Developers inline autocompletion not working (temporary Salesforce API regression) — RoseSilverSoftware/IlluminatedCloud0 reactions
On Stack Overflow · 2
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/doc-maintenance.mdcCursor rule
- .cursor/rules/verification.mdcCursor rule
- .cursor/rules/wireit.mdcCursor rule
- vscode-extension-launchSkill
- announce-prereleaseSkill
- backlog-groomingSkill
- changelogSkill
- command-uiSkill
- conciseSkill
- core-extension-apiSkill
- dependabot-alertsSkill
- drivable-vscodeSkill
- effect-best-practicesSkill
- external-consumersSkill
- feature-branchSkill
- grill-meSkill
- gus-cliSkill
- i18n-messagesSkill
- icons-srcSkill
- lit-componentsSkill
- lit-webview-architectureSkill
- lit-webview-testingSkill
- lsp-custom-requestsSkill
- merge-conflictsSkill
- packageJsonSkill
- patch-releaseSkill
- pathsSkill
- playwright-e2eSkill
- pr-draftSkill
- query-app-insightsSkill
- releaseSkill
- services-extension-consumptionSkill
- shipped-issuesSkill
- thermo-nuclear-code-quality-reviewSkill
- ts1261-filename-casingSkill
- ts4023-effect-errorsSkill
- typescriptSkill
- verificationSkill
- vscode-elements-webviewsSkill
- vscode-window-messagesSkill
- web-console-local-tracesSkill
- wireitSkill
- work-item-sequencingSkill
- changelog-judgmentSkill
- manual-test-plan-judgmentSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
Add to .esbuild-web-extra-settings.json at repo root (gitignored):
- Very specific: line 96
Start server first: npm run spans:server -w salesforcedx-vscode-services
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Span & Log File Export
Local OTLP export to ~/.sf/vscode-spans/ for AI consumers. Spans + log records interleaved in one JSONL file.
Settings
| Setting | Default | Purpose |
salesforcedx-vscode-salesforcedx.enableFileTraces | false | Enable file capture (spans + logs) |
salesforcedx-vscode-salesforcedx.logLevel | error | Min log level exported. info/debug for most logs. |
SF_LOG_LEVEL env var | — | Fallback when setting unset (fatal→error) |
Reload window after changing — SDK layer builds at activation.
Location
Dir: ~/.sf/vscode-spans/. Filename: {ISO-timestamp}.jsonl (e.g. 2026-05-22T15-33-01-398Z.jsonl).
Latest: ls -lt ~/.sf/vscode-spans/ | head -1
Record Format
Each line independent JSON. Discriminate on kind.
Spans (kind: "span")
{"kind":"span","traceId":"abc123","spanId":"def456","parentSpanId":"","name":"ConnectionService.getConnection","spanKind":1,"startTimeUnixNano":"1779461510277547833","endTimeUnixNano":"1779461510278117291","attributes":{"orgId":"00D..."},"events":[],"links":[],"status":{"code":1,"message":""},"resource":{"attributes":{"extension.name":"salesforcedx-vscode-core","service.name":"salesforcedx-vscode-core"}},"instrumentationScope":{"name":"salesforcedx-vscode-core","version":"2026-03-02T01:00.304Z"}}| Field | Notes |
parentSpanId: "" | Root span |
status.code | 1=OK, 2=ERROR |
spanKind | OTEL SpanKind +1 (1=INTERNAL, 2=SERVER, 3=CLIENT) |
resource.attributes["extension.name"] | Emitting extension |
| Duration (ms) | (endTimeUnixNano - startTimeUnixNano) / 1_000_000 |
Identity attrs (userId, cliId, webUserId, orgId, common.*) stamped only on root spans — child spans have them null; not a gap. Mirrors the App Insights properties exactly. userId absent for expired/unauthenticated orgs. Note: an internal diagnostic child span (maybeUpdateDefaultOrgRef) annotates the literal string "undefined" when SOQL userId is unresolved — that string never reaches exported root spans (filtered out).
f=$(ls -t ~/.sf/vscode-spans/*.jsonl | head -1)
jq -rc 'select(.kind=="span" and .parentSpanId=="") | {name, userId:.attributes.userId, cliId:.attributes.cliId, webUserId:.attributes.webUserId, orgId:.attributes.orgId}' "$f" | sort -uLogs (kind: "log")
{"kind":"log","timestamp":"1779463981397000000","severityText":"WARN","severityNumber":30000,"body":"UserIdNotFoundError: Could not determine user ID","traceId":"b4d710...","spanId":"706dfc...","attributes":{"fiberId":"#295"}}| Field | Notes |
traceId + spanId | Span active when log emitted |
severityText | INFO, WARN, ERROR (filtered by logLevel) |
body | String or array (multiple args) |
timestamp | Nanos since epoch |
Enable (Desktop)
{
"salesforcedx-vscode-salesforcedx.enableFileTraces": true,
"salesforcedx-vscode-salesforcedx.logLevel": "info"
}Hosted Web Console cannot write this dir. Local OTLP (enableLocalTraces → :4318) → web-console-local-traces.
Enable (Web / run:web)
Web POSTs to local span file server (port 3003). Server must run.
npm run spans:server -w salesforcedx-vscode-services- Add to
.esbuild-web-extra-settings.jsonat repo root (gitignored):{ "salesforcedx-vscode-salesforcedx.enableFileTraces": true } npm run run:web -w packages/<extension>
App Insights Telemetry Capture
Inspect App Insights telemetry each platform would send to Azure — captured locally, never sent. Output: ~/.sf/vscode-appinsights/ (separate from spans), via same server (port 3003).
| Platform | Trigger | Exporter | Endpoint | File prefix |
| Desktop (Node) | Dev/Test mode (auto); custom port via SF_OTEL_INGESTION_ENDPOINT | Azure Monitor | /v2.1/track | appinsights- |
| Web | ESBUILD_WEB_LOCAL=1 (auto under run:web) | @vscode/extension-telemetry | /v2.1/track | appinsights-web- |
Start server first: npm run spans:server -w salesforcedx-vscode-services
Desktop (Node)
Extension via --extensionDevelopmentPath (F5, vscode-test, Playwright desktop e2e) = ExtensionMode.Development/Test, which auto-diverts App Insights to http://localhost:3003/v2.1/track — no env var or setting. Telemetry force-enabled (provably can't reach Azure).
Custom port: SF_OTEL_INGESTION_ENDPOINT=http://localhost:NNNN.
Divert Mechanism: Connection string stays pristine. Both FilteredAzureMonitorTraceExporter (dependencies path) and ApplicationInsightsNodeExporter (customEvents path) swap their private HTTP transport to POST Breeze envelopes over plain HTTP to {localIngestionEndpoint}/v2.1/track. Why swap transport? The Azure SDK's ConnectionStringParser.sanitizeUrl force-upgrades http:// → https://, blocking plain-HTTP localhost servers.
Server gzip-decompresses, writes raw Breeze envelopes (exact wire format Azure receives). Top-level keys: name, time, instrumentationKey, sampleRate, tags, version, data. No iKey, no target. Custom dimensions (IDs, common.*) live in data.baseData.properties, NOT directly under baseData:
{"name":"Microsoft.ApplicationInsights.RemoteDependency","time":"2026-06-15T15:44:24.223Z","instrumentationKey":"f5cbbeba-...","sampleRate":100,"version":1,"tags":{"ai.cloud.role":"salesforcedx-vscode-core","ai.operation.id":"f2da4484..."},"data":{"baseType":"RemoteDependencyData","baseData":{"name":"ConnectionService.getConnection","id":"1250a85f...","success":true,"resultCode":"0","duration":"00:00:00.001","properties":{"common.extname":"salesforcedx-vscode-core","cliId":"00d6...","webUserId":"701b...","userId":"005..."},"measurements":{}}}}Filename: appinsights-{ISO-timestamp}.jsonl. data.baseType: RemoteDependencyData (span path), MetricData, ExceptionData, or EventData (customEvents path).
| Field | Notes |
instrumentationKey | connection key (NOT iKey) |
tags["ai.cloud.role"] | emitting extension |
data.baseData.properties | custom dimensions: cliId, webUserId, userId, common.*, telemetryTag |
Identity lands only on root spans (spanTransformProcessor gates on !span.parentSpanContext) → most envelopes/spans lack IDs; that's expected, not a gap. userId (SOQL-derived) is absent until an org is authenticated and the query resolves; absent for expired orgs. cliId/webUserId are install-stable, present once seedTelemetryIdentities runs at activation — activation spans firing before that seeding are bare.
customEvents path (EventData, via ApplicationInsightsNodeExporter) only emits when an extension's packageJSON sets enableCustomEventsFromSpans. None do today — so only the dependencies path (RemoteDependencyData) appears.
Useful queries:
g=$(ls -t ~/.sf/vscode-appinsights/*.jsonl | head -1)
jq -rc '.data.baseType' "$g" | sort | uniq -c # envelope mix
jq -rc 'select(.data.baseType=="RemoteDependencyData") | {name:.data.baseData.name, role:.tags["ai.cloud.role"], userId:.data.baseData.properties.userId, cliId:.data.baseData.properties.cliId, webUserId:.data.baseData.properties.webUserId}' "$g"Web
npm run run:web builds via vscode:bundle:local, setting ESBUILD_WEB_LOCAL=1 — web exporter POSTs to http://localhost:3003/v2.1/track (shared Node endpoint). (SF_OTEL_INGESTION_ENDPOINT has no effect on web: connection string hard-coded.)
Payload is not Breeze — it's the @vscode/extension-telemetry shape:
{"name":"ConnectionService.getConnection","eventType":"event","properties":{"orgId":"00D...","common.extname":"salesforcedx-vscode-core"},"measurements":{"duration":42}}Filename: appinsights-web-{ISO-timestamp}.jsonl. eventType: event (success) or errorEvent (failed span).
Workflow
npm run spans:server -w salesforcedx-vscode-services- Desktop: launch extension in dev/test mode (auto). Web:
npm run run:web -w packages/<extension>(auto). - Trigger commands/spans
- View:
cat ~/.sf/vscode-appinsights/*.jsonl | jq '.' | less
Clear
rm ~/.sf/vscode-appinsights/*
Trace Correlation
Logs reference active span via traceId + spanId. Reconstruct:
- Find all spans with a
traceId - Build tree via
parentSpanId→ children - Find logs with same
traceId— belong to span matching theirspanId
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

