Skip to content

Commit 7247ee0

Browse files
committed
Only check setting once
1 parent 483f429 commit 7247ee0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/common/1dsClientFactory.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ const getAICore = async (key: string, vscodeAPI: typeof vscode, xhrOverride?: IX
4444
coreConfig.extensionConfig[collectorChannelPlugin.identifier] = channelConfig;
4545
}
4646

47+
const config = vscodeAPI.workspace.getConfiguration("telemetry");
48+
const internalTesting = config.get<boolean>("internalTesting");
49+
4750
appInsightsCore.initialize(coreConfig, []);
4851

4952
appInsightsCore.addTelemetryInitializer((envelope) => {
50-
const config = vscodeAPI.workspace.getConfiguration("telemetry");
51-
const internalTesting = config.get<boolean>("internalTesting");
5253
// Only add this flag when `telemetry.internalTesting` is enabled
5354
if (!internalTesting) {
5455
return;

0 commit comments

Comments
 (0)