agentleFS
forcedotcomforcedotcom/salesforcedx-vscode/.claude/skills/web-console-local-traces/SKILL.md

web-console-local-traces

Skill1k starsChanged 26 days agoBSD-3-ClauseView on GitHub

Unblock hosted Web Console OTLP to localhost:4318. Chrome Local Network Access (loopback address space) plus grafana/otel-lgtm CORS for https://cdn.web-ide.platform.salesforce.com. Use when Web Console traces fail with CORS, loopback, LNA, or otel-lgtm.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about forcedotcom/salesforcedx-vscode

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

45 more on GitHub

The file

Files
SKILL.md

Web Console local OTLP

Hosted Web Console origin https://cdn.web-ide.platform.salesforce.com POSTs to http://localhost:4318/v1/traces when salesforcedx-vscode-salesforcedx.enableLocalTraces is on (OTLPTraceExporter default in spansWeb.ts). Two independent blocks; LNA first.

Canonical docker overlay: observability README.

1. Chrome Local Network Access

Error: Permission was denied for this request to access the loopback address space.

Chrome 142+ Local Network Access gates public origin → loopback before CORS headers apply.

Web Console often has no extension toolbar and may iframe the CDN origin, so site-settings / CORS extensions fail. Disable the check in a normal Chrome tab, same profile:

  1. chrome://flags/#local-network-access-check → Disabled
  2. Relaunch Chrome
  3. Reload Web Console

Done when: console no longer mentions loopback / address space. Remaining errors are collector CORS.

2. otel-lgtm HTTPS CORS

Image grafana/otel-lgtm allowlists http://* only (v0.33.0 config). HTTPS Salesforce origin does not match.

Overlay file (any path; example ~/.otel-lgtm/otelcol-cors.yaml):

receivers:
  otlp:
    protocols:
      http:
        cors:
          allowed_origins:
            - http://*
            - https://cdn.web-ide.platform.salesforce.com
          allowed_headers:
            - "*"

Restart collector with the overlay (image config paths):

docker run -d --rm --name otel-lgtm \
  -p 3000:3000 -p 4317:4317 -p 4318:4318 \
  -v "$HOME/.otel-lgtm/otelcol-cors.yaml:/otel-lgtm/otelcol-cors.yaml:ro" \
  -e OTELCOL_EXTRA_ARGS='--config=file:/otel-lgtm/otelcol-cors.yaml' \
  docker.io/grafana/otel-lgtm

Done when:

curl -si -X OPTIONS http://localhost:4318/v1/traces \
  -H 'Origin: https://cdn.web-ide.platform.salesforce.com' \
  -H 'Access-Control-Request-Method: POST' \
  -H 'Access-Control-Request-Headers: content-type'

returns access-control-allow-origin: https://cdn.web-ide.platform.salesforce.com.

Plain ["*"] origin is rejected when credentials are on (collector HTTP CORS).

3. Enable the setting

Web Console Settings → salesforcedx-vscode-salesforcedx.enableLocalTraces = true. Reload. Grafana: http://localhost:3000 (admin/admin).

File traces (enableFileTraces → ~/.sf/vscode-spans/) are a different sink — see span-file-export. Hosted Web Console cannot write that dir; use this OTLP path.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.