Skip to content

send telemetry for language client errors#14577

Open
bobbrow wants to merge 1 commit into
mainfrom
bobbrow/errorTelemetry
Open

send telemetry for language client errors#14577
bobbrow wants to merge 1 commit into
mainfrom
bobbrow/errorTelemetry

Conversation

@bobbrow

@bobbrow bobbrow commented Jul 10, 2026

Copy link
Copy Markdown
Member

I am seeing languageClientCrash telemetry in cases where I suspect a crash in cpptools has not actually happened. The logs show cpptools.exe being orphaned in some cases. I'm hoping this will give us some insight into what is breaking the connection so we can stop sending the crash telemetry for routine disconnect cases.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds telemetry for vscode-languageclient error callbacks in the C/C++ extension’s Language Server client, with the goal of distinguishing routine disconnect/error conditions from genuine language server crashes (to reduce misleading crash telemetry).

Changes:

  • Emit a new C_Cpp/LanguageServer/languageClientError telemetry event from the language client errorHandler.error callback.
  • Include basic error context (error, message, count) in the telemetry payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1758 to +1765
error: (error, message, count) => {
telemetry.logLanguageServerEvent("languageClientError", {
error: error.toString(),
message: message?.toString() ?? '',
count: count?.toString() ?? ''
});
return { action: ErrorAction.Continue };
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

2 participants