Skip to content

Commit 6f77b3d

Browse files
authored
Get telemetry client and LS middleware working in the browser (microsoft#17010)
1 parent 8733975 commit 6f77b3d

11 files changed

Lines changed: 608 additions & 493 deletions

File tree

.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
@@ -193,7 +193,11 @@ function getAllowedWarningsForWebPack(buildConfig) {
193193
'WARNING in ./node_modules/applicationinsights/out/AutoCollection/NativePerformance.js',
194194
];
195195
case 'browser':
196-
return [];
196+
return [
197+
'WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).',
198+
'WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.',
199+
'WARNING in webpack performance recommendations:',
200+
];
197201
default:
198202
throw new Error('Unknown WebPack Configuration');
199203
}

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
@@ -2017,7 +2017,7 @@
20172017
"untildify": "^3.0.2",
20182018
"vscode-debugadapter": "^1.28.0",
20192019
"vscode-debugprotocol": "^1.28.0",
2020-
"vscode-extension-telemetry": "0.1.4",
2020+
"vscode-extension-telemetry": "0.2.8",
20212021
"vscode-jsonrpc": "6.0.0",
20222022
"vscode-jupyter-lsp-middleware": "^0.1.3",
20232023
"vscode-languageclient": "7.0.0",

0 commit comments

Comments
 (0)