@W-23237062 feat(telemetry): surface failure detail, add config-error hint, classify errors#525
Open
clavery wants to merge 1 commit into
Open
@W-23237062 feat(telemetry): surface failure detail, add config-error hint, classify errors#525clavery wants to merge 1 commit into
clavery wants to merge 1 commit into
Conversation
…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.
f0a95d6 to
87adda0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_CALLEDwithisError) 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 recorderrorMessage(anderrorCausewhen present), matching the CLI's existingCOMMAND_ERRORconvention.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_ERRORevents now carry anerrorCategory(validation/guardrail/runtime).isCIflag.Together these let analytics separate expected user/config errors and CI traffic from genuine runtime failures when measuring reliability.
Notes
EADDRINUSEport error was reviewed; it already names theSFCC_OAUTH_LOCAL_PORToverride env var, so no change was needed there.@salesforce/b2c-tooling-sdk,@salesforce/b2c-cli,@salesforce/b2c-dx-mcp, andb2c-vs-extension.