@@ -327,14 +327,21 @@ class Driver implements ServerStarter {
327
327
analysisServerOptions.newAnalysisDriverLog =
328
328
results[NEW_ANALYSIS_DRIVER_LOG ];
329
329
analysisServerOptions.clientId = results[CLIENT_ID ];
330
+ analysisServerOptions.useLanguageServerProtocol = results[USE_LSP ];
331
+ // For clients that don't supply their own identifier, use a default based on
332
+ // whether the server will run in LSP mode or not.
333
+ analysisServerOptions.clientId ?? =
334
+ analysisServerOptions.useLanguageServerProtocol
335
+ ? 'unknown.client.lsp'
336
+ : 'unknown.client.classic' ;
337
+
330
338
analysisServerOptions.clientVersion = results[CLIENT_VERSION ];
331
339
analysisServerOptions.cacheFolder = results[CACHE_FOLDER ];
332
340
if (results.wasParsed (ENABLE_EXPERIMENT_OPTION )) {
333
341
analysisServerOptions.enabledExperiments =
334
342
(results[ENABLE_EXPERIMENT_OPTION ] as List ).cast <String >().toList ();
335
343
}
336
344
analysisServerOptions.useFastaParser = results[USE_FASTA_PARSER ];
337
- analysisServerOptions.useLanguageServerProtocol = results[USE_LSP ];
338
345
analysisServerOptions.useNewRelevance = results[USE_NEW_RELEVANCE ];
339
346
340
347
// Read in any per-SDK overrides specified in <sdk>/config/settings.json.
@@ -383,8 +390,7 @@ class Driver implements ServerStarter {
383
390
analysisServerOptions.analytics = analytics;
384
391
385
392
// Record the client name as the application installer ID.
386
- analytics.setSessionValue (
387
- 'aiid' , analysisServerOptions.clientId ?? 'not-set' );
393
+ analytics.setSessionValue ('aiid' , analysisServerOptions.clientId);
388
394
if (analysisServerOptions.clientVersion != null ) {
389
395
analytics.setSessionValue ('cd1' , analysisServerOptions.clientVersion);
390
396
}
0 commit comments