diff --git a/src/snyk/common/experiment/services/experimentService.ts b/src/snyk/common/experiment/services/experimentService.ts index 0edceb5e4..28f11a355 100644 --- a/src/snyk/common/experiment/services/experimentService.ts +++ b/src/snyk/common/experiment/services/experimentService.ts @@ -7,6 +7,7 @@ import { User } from '../../user'; export enum ExperimentKey { // to be populated with running experiment keys TestExperiment = 'vscode-test-experiment', + OssViaLanguageServer = 'snyk-oss-via-ls-in-vs-code-integration', } export class ExperimentService { diff --git a/src/snyk/extension.ts b/src/snyk/extension.ts index 722069a13..26689eb4c 100644 --- a/src/snyk/extension.ts +++ b/src/snyk/extension.ts @@ -41,7 +41,7 @@ import { } from './common/constants/views'; import { ErrorHandler } from './common/error/errorHandler'; import { ErrorReporter } from './common/error/errorReporter'; -import { ExperimentService } from './common/experiment/services/experimentService'; +import { ExperimentKey, ExperimentService } from './common/experiment/services/experimentService'; import { LanguageServer } from './common/languageServer/languageServer'; import { StaticLsApi } from './common/languageServer/staticLsApi'; import { Logger } from './common/logger/logger'; @@ -363,6 +363,11 @@ class SnykExtension extends SnykLib implements IExtension { this.analytics.load(); this.experimentService.load(); + const ossViaLanguageServer = await this.experimentService.isUserPartOfExperiment( + ExperimentKey.OssViaLanguageServer, + true, + ); + console.log(`Snyk "Open Source Security" via Language Server: ${ossViaLanguageServer}`); this.logPluginIsInstalled();