Skip to content

Commit 896d7fc

Browse files
jakebaileykarthiknadig
authored andcommitted
Get telemetry client and LS middleware working in the browser (#17010)
1 parent c50532c commit 896d7fc

File tree

11 files changed

+607
-492
lines changed

11 files changed

+607
-492
lines changed

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"files.exclude": {
44
"out": true, // set this to true to hide the "out" folder with the compiled JS files
5+
"dist": true,
56
"**/*.pyc": true,
67
".nyc_output": true,
78
"obj": true,
@@ -15,6 +16,7 @@
1516
},
1617
"search.exclude": {
1718
"out": true, // set this to false to include "out" folder in search results
19+
"dist": true,
1820
"**/node_modules": true,
1921
"coverage": true,
2022
"languageServer*/**": true,

build/webpack/webpack.extension.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ const config = {
5353
},
5454
],
5555
},
56-
externals: ['vscode', 'commonjs', ...existingModulesInOutDir],
56+
externals: [
57+
'vscode',
58+
'commonjs',
59+
...existingModulesInOutDir,
60+
// These dependencies are ignored because we don't use them, and App Insights has try-catch protecting their loading if they don't exist
61+
// See: https://github.com/microsoft/vscode-extension-telemetry/issues/41#issuecomment-598852991
62+
'applicationinsights-native-metrics',
63+
'@opentelemetry/tracing',
64+
],
5765
plugins: [...common.getDefaultPlugins('extension')],
5866
resolve: {
5967
alias: {

gulpfile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ function getAllowedWarningsForWebPack(buildConfig) {
201201
'WARNING in ./node_modules/applicationinsights/out/AutoCollection/NativePerformance.js',
202202
];
203203
case 'browser':
204-
return [];
204+
return [
205+
'WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).',
206+
'WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.',
207+
'WARNING in webpack performance recommendations:',
208+
];
205209
default:
206210
throw new Error('Unknown WebPack Configuration');
207211
}

news/3 Code Health/16871.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update telemetry client to support browser, plumb to Pylance.

news/3 Code Health/16872.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Refactor language server middleware to work in the browser.

package-lock.json

Lines changed: 3 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2265,7 +2265,7 @@
22652265
"untildify": "^3.0.2",
22662266
"vscode-debugadapter": "^1.28.0",
22672267
"vscode-debugprotocol": "^1.28.0",
2268-
"vscode-extension-telemetry": "0.1.4",
2268+
"vscode-extension-telemetry": "0.2.8",
22692269
"vscode-jsonrpc": "6.0.0",
22702270
"vscode-languageclient": "7.0.0",
22712271
"vscode-languageserver": "7.0.0",

0 commit comments

Comments
 (0)