Support enabling connection pooling (on demand) + additional telemetry (#23664)

This commit is contained in:
Cheena Malhotra
2023-07-07 11:31:10 -07:00
committed by GitHub
parent cb32513f9e
commit 3a7ce6ac24
7 changed files with 77 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
import * as azdata from 'azdata';
import * as path from 'path';
import * as azurecore from 'azurecore';
import { getAzureAuthenticationLibraryConfig, getCommonLaunchArgsAndCleanupOldLogFiles, getConfigTracingLevel, getEnableSqlAuthenticationProviderConfig, getOrDownloadServer, getParallelMessageProcessingConfig, logDebug, TracingLevel } from './utils';
import { getAzureAuthenticationLibraryConfig, getCommonLaunchArgsAndCleanupOldLogFiles, getConfigTracingLevel, getEnableConnectionPoolingConfig, getEnableSqlAuthenticationProviderConfig, getOrDownloadServer, getParallelMessageProcessingConfig, logDebug, TracingLevel } from './utils';
import { TelemetryReporter, LanguageClientErrorHandler } from './telemetry';
import { SqlOpsDataClient, ClientOptions } from 'dataprotocol-client';
import { TelemetryFeature, AgentServicesFeature, SerializationFeature, AccountFeature, SqlAssessmentServicesFeature, ProfilerFeature, TableDesignerFeature, ExecutionPlanServiceFeature } from './features';
@@ -167,6 +167,10 @@ function generateServerOptions(logPath: string, executablePath: string): ServerO
if (azureAuthLibrary === 'MSAL' && enableSqlAuthenticationProvider === true) {
launchArgs.push('--enable-sql-authentication-provider');
}
const enableConnectionPooling = getEnableConnectionPoolingConfig()
if (enableConnectionPooling) {
launchArgs.push('--enable-connection-pooling');
}
return { command: executablePath, args: launchArgs, transport: TransportKind.stdio };
}