Skip to content

Commit 9d9321a

Browse files
committed
Report when the client LSP is fully initialized
1 parent 55ab3bd commit 9d9321a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/lsptoolshost/server/roslynLanguageServer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export class RoslynLanguageServer {
183183
state: ServerState.Started,
184184
workspaceLabel: this.workspaceDisplayName(),
185185
});
186+
this._telemetryReporter.sendTelemetryEvent(TelemetryEventNames.ClientServerReady);
186187
} else if (state.newState === State.Stopped) {
187188
this._languageServerEvents.onServerStateChangeEmitter.fire({
188189
state: ServerState.Stopped,
@@ -338,7 +339,7 @@ export class RoslynLanguageServer {
338339
* Returns whether or not the underlying LSP server is running or not.
339340
*/
340341
public isRunning(): boolean {
341-
return this._languageClient.state === State.Running;
342+
return this._languageClient.isRunning();
342343
}
343344

344345
/**

src/shared/telemetryEventNames.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,17 @@ export enum TelemetryEventNames {
1111
CSharpActivated = 'CSharpActivated',
1212

1313
// Events related to the roslyn language server.
14+
15+
// Roslyn client has started initialization process.
1416
ClientInitialize = 'roslyn/clientInitialize',
17+
// Roslyn client has started the server initialization process.
1518
ClientServerStart = 'roslyn/clientServerInitialize',
19+
// Roslyn client has acquired the runtime needed to start the server.
1620
AcquiredRuntime = 'roslyn/acquiredRuntime',
21+
// Roslyn client has successfully started the server process.
1722
LaunchedServer = 'roslyn/launchedServer',
23+
// Roslyn client has connected to the server process named pipe.
1824
ClientConnected = 'roslyn/clientConnected',
25+
// Roslyn client and server have fully initialized via LSP.
26+
ClientServerReady = 'roslyn/clientServerReady',
1927
}

0 commit comments

Comments
 (0)