Skip to content

@W-23237062 feat(telemetry): surface failure detail, add config-error hint, classify errors#525

Open
clavery wants to merge 1 commit into
mainfrom
feature/telem-investigation
Open

@W-23237062 feat(telemetry): surface failure detail, add config-error hint, classify errors#525
clavery wants to merge 1 commit into
mainfrom
feature/telem-investigation

Conversation

@clavery

@clavery clavery commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Telemetry improvements driven by analysis of a production snapshot (~60k events across the CLI, MCP server, and VS Code extension). Three independent changes, all additive and best-effort (telemetry never affects command behavior):

1. Surface failure detail on MCP + VS Code errors

MCP tool-call failures (TOOL_CALLED with isError) and VS Code extension activation failures (ACTIVATION_FAILED) were emitting empty error messages — every one of them — which made server-side and extension failures impossible to root-cause. Both now record errorMessage (and errorCause when present), matching the CLI's existing COMMAND_ERROR convention.

2. Docs-link hint when no config source is present

When a command requires instance/auth configuration but no source is found at all (no flags, env vars, or dw.json — the dominant cause of "X is required" errors), the error now points to the configuration guide. When a config source is partially present, the existing message (which lists the specific flag/env var) is unchanged.

3. Error classification + CI tagging for reliability KPIs

  • COMMAND_ERROR events now carry an errorCategory (validation / guardrail / runtime).
  • All telemetry events now carry an isCI flag.

Together these let analytics separate expected user/config errors and CI traffic from genuine runtime failures when measuring reliability.

Notes

  • The OAuth EADDRINUSE port error was reviewed; it already names the SFCC_OAUTH_LOCAL_PORT override env var, so no change was needed there.
  • Changesets included for @salesforce/b2c-tooling-sdk, @salesforce/b2c-cli, @salesforce/b2c-dx-mcp, and b2c-vs-extension.

…ify errors

Improve developer-tooling telemetry based on analysis of a production
snapshot (~60k events). Three changes:

- Surface failure detail: MCP tool-call failures (TOOL_CALLED isError)
  and VS Code activation failures (ACTIVATION_FAILED) emitted empty
  error messages, blocking root-cause analysis. Both now record
  errorMessage/errorCause, matching the CLI COMMAND_ERROR convention.
- Config-error docs hint: when a command needs instance/auth config but
  no source is present (no flags, env, or dw.json), the "X is required"
  error now points to the configuration guide. Unchanged when a source
  is partially present.
- Error classification + CI tagging: COMMAND_ERROR carries an
  errorCategory (validation/guardrail/runtime) and all events carry an
  isCI flag, so analytics can exclude expected user/config errors and
  CI traffic from the reliability rate.

Touches @salesforce/b2c-tooling-sdk, @salesforce/b2c-cli,
@salesforce/b2c-dx-mcp, and b2c-vs-extension.
@clavery clavery force-pushed the feature/telem-investigation branch from f0a95d6 to 87adda0 Compare June 29, 2026 18:56
@clavery clavery changed the title feat(telemetry): surface failure detail, add config-error hint, classify errors @W-23237062 feat(telemetry): surface failure detail, add config-error hint, classify errors Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant