parent
dc8bbb259e
commit
8ffdc18c1d
11 changed files with 280 additions and 68 deletions
|
@ -28,6 +28,7 @@
|
||||||
"update-distro": "node build/npm/update-distro.js"
|
"update-distro": "node build/npm/update-distro.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@microsoft/applicationinsights-web": "^2.1.1",
|
||||||
"applicationinsights": "1.0.8",
|
"applicationinsights": "1.0.8",
|
||||||
"graceful-fs": "4.1.11",
|
"graceful-fs": "4.1.11",
|
||||||
"http-proxy-agent": "^2.1.0",
|
"http-proxy-agent": "^2.1.0",
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "vscode-reh",
|
"name": "vscode-reh",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@microsoft/applicationinsights-web": "^2.1.1",
|
||||||
"applicationinsights": "1.0.8",
|
"applicationinsights": "1.0.8",
|
||||||
"getmac": "1.4.1",
|
"getmac": "1.4.1",
|
||||||
"graceful-fs": "4.1.11",
|
"graceful-fs": "4.1.11",
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "vscode-web",
|
"name": "vscode-web",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@microsoft/applicationinsights-web": "^2.1.1",
|
||||||
"onigasm-umd": "^2.2.2",
|
"onigasm-umd": "^2.2.2",
|
||||||
"vscode-textmate": "^4.1.1",
|
"vscode-textmate": "^4.1.1",
|
||||||
"xterm": "3.15.0-beta67",
|
"xterm": "3.15.0-beta67",
|
||||||
|
|
|
@ -2,6 +2,69 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-analytics-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-analytics-js/-/applicationinsights-analytics-js-2.1.1.tgz#6d09c1915f808026e2d45165d04802f09affed59"
|
||||||
|
integrity sha512-VKIutoFKY99CyKwxLUuj6Vnq14/QwXo9/QSQDpYnHEjo+uKn7QmLsHqWw0K9uYNfNAXt4BZimX/zDg6jZtzeXg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-channel-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-2.1.1.tgz#e205eddd93e49d17d9e0711a612b4bfc9810888f"
|
||||||
|
integrity sha512-fYr9IAqtaEr9AmaPaL3SLQVT3t3GQzl+n74gpNKyAVakDIm0nYQ/bimjdcAhJMDf1VGNSPg/xICneyuZg7Wxlg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-common@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-common/-/applicationinsights-common-2.1.1.tgz#27e6074584a7a3a8ca3f11f7ff2b7ff0f395bf2d"
|
||||||
|
integrity sha512-2hkS1Ia1FmAjCuYZ5JlG20/WgObqdsKtmK5YALAFGHIB4KSQ/Za1qazS+7GsG+E0F9UJivNWL1geUIcNqg5Qjg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-core-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.1.1.tgz#30fb6a519cc1c6119c419c4811ce72c260217d9e"
|
||||||
|
integrity sha512-4t4wf6SKqIcWEQDPg/uOhm+BxtHhu/AFreyEoYZmMfcxzAu33h1FtTQRtxBNbYH1+thiNZCh80yUpnT7d9Hrlw==
|
||||||
|
dependencies:
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-dependencies-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-dependencies-js/-/applicationinsights-dependencies-js-2.1.1.tgz#8154c3efcb24617d015d0bce7c2cc47797a8d3c4"
|
||||||
|
integrity sha512-yhb4EToBp+aI+qLo0h5NDNtoo3sDFV60uyIOK843YjzXqVotcXX/lRShlghTkJtYH09QhrdzDjViUHnD4sMFSQ==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-properties-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-properties-js/-/applicationinsights-properties-js-2.1.1.tgz#ca34232766eb16167b5d87693e2ae5d94f2a1559"
|
||||||
|
integrity sha512-8l+/ppw6xKTam2RL4EHZ52Lcf217olw81j6kyBNKtIcGwSnLNHrFwEeF3vBWIteG2JKzlg1GhGjrkB3oxXsV2g==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-web@^2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-web/-/applicationinsights-web-2.1.1.tgz#1a44eddda7c244b88d9eb052dab6c855682e4f05"
|
||||||
|
integrity sha512-crvhCkNsNxkFuPWmttyWNSAA96D5FxBtKS6UA9MV9f9XHevTfchf/E3AuU9JZcsXufWMQLwLrUQ9ZiA1QJ0EWA==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-analytics-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-channel-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-dependencies-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-properties-js" "2.1.1"
|
||||||
|
|
||||||
nan@^2.14.0:
|
nan@^2.14.0:
|
||||||
version "2.14.0"
|
version "2.14.0"
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
|
||||||
|
@ -24,6 +87,11 @@ semver-umd@^5.5.3:
|
||||||
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.3.tgz#b64d7a2d4f5a717b369d56e31940a38e47e34d1e"
|
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.3.tgz#b64d7a2d4f5a717b369d56e31940a38e47e34d1e"
|
||||||
integrity sha512-HOnQrn2iKnVe/xlqCTzMXQdvSz3rPbD0DmQXYuQ+oK1dpptGFfPghonQrx5JHl2O7EJwDqtQnjhE7ME23q6ngw==
|
integrity sha512-HOnQrn2iKnVe/xlqCTzMXQdvSz3rPbD0DmQXYuQ+oK1dpptGFfPghonQrx5JHl2O7EJwDqtQnjhE7ME23q6ngw==
|
||||||
|
|
||||||
|
tslib@^1.9.3:
|
||||||
|
version "1.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
||||||
|
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
|
||||||
|
|
||||||
vscode-textmate@^4.1.1:
|
vscode-textmate@^4.1.1:
|
||||||
version "4.2.2"
|
version "4.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-4.2.2.tgz#0b4dabc69a6fba79a065cb6b615f66eac07c8f4c"
|
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-4.2.2.tgz#0b4dabc69a6fba79a065cb6b615f66eac07c8f4c"
|
||||||
|
|
|
@ -2,6 +2,69 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-analytics-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-analytics-js/-/applicationinsights-analytics-js-2.1.1.tgz#6d09c1915f808026e2d45165d04802f09affed59"
|
||||||
|
integrity sha512-VKIutoFKY99CyKwxLUuj6Vnq14/QwXo9/QSQDpYnHEjo+uKn7QmLsHqWw0K9uYNfNAXt4BZimX/zDg6jZtzeXg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-channel-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-2.1.1.tgz#e205eddd93e49d17d9e0711a612b4bfc9810888f"
|
||||||
|
integrity sha512-fYr9IAqtaEr9AmaPaL3SLQVT3t3GQzl+n74gpNKyAVakDIm0nYQ/bimjdcAhJMDf1VGNSPg/xICneyuZg7Wxlg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-common@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-common/-/applicationinsights-common-2.1.1.tgz#27e6074584a7a3a8ca3f11f7ff2b7ff0f395bf2d"
|
||||||
|
integrity sha512-2hkS1Ia1FmAjCuYZ5JlG20/WgObqdsKtmK5YALAFGHIB4KSQ/Za1qazS+7GsG+E0F9UJivNWL1geUIcNqg5Qjg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-core-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.1.1.tgz#30fb6a519cc1c6119c419c4811ce72c260217d9e"
|
||||||
|
integrity sha512-4t4wf6SKqIcWEQDPg/uOhm+BxtHhu/AFreyEoYZmMfcxzAu33h1FtTQRtxBNbYH1+thiNZCh80yUpnT7d9Hrlw==
|
||||||
|
dependencies:
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-dependencies-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-dependencies-js/-/applicationinsights-dependencies-js-2.1.1.tgz#8154c3efcb24617d015d0bce7c2cc47797a8d3c4"
|
||||||
|
integrity sha512-yhb4EToBp+aI+qLo0h5NDNtoo3sDFV60uyIOK843YjzXqVotcXX/lRShlghTkJtYH09QhrdzDjViUHnD4sMFSQ==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-properties-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-properties-js/-/applicationinsights-properties-js-2.1.1.tgz#ca34232766eb16167b5d87693e2ae5d94f2a1559"
|
||||||
|
integrity sha512-8l+/ppw6xKTam2RL4EHZ52Lcf217olw81j6kyBNKtIcGwSnLNHrFwEeF3vBWIteG2JKzlg1GhGjrkB3oxXsV2g==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-web@^2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-web/-/applicationinsights-web-2.1.1.tgz#1a44eddda7c244b88d9eb052dab6c855682e4f05"
|
||||||
|
integrity sha512-crvhCkNsNxkFuPWmttyWNSAA96D5FxBtKS6UA9MV9f9XHevTfchf/E3AuU9JZcsXufWMQLwLrUQ9ZiA1QJ0EWA==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-analytics-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-channel-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-dependencies-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-properties-js" "2.1.1"
|
||||||
|
|
||||||
agent-base@4, agent-base@^4.1.0:
|
agent-base@4, agent-base@^4.1.0:
|
||||||
version "4.2.0"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce"
|
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce"
|
||||||
|
@ -1024,6 +1087,11 @@ to-regex@^3.0.1, to-regex@^3.0.2:
|
||||||
regex-not "^1.0.2"
|
regex-not "^1.0.2"
|
||||||
safe-regex "^1.1.0"
|
safe-regex "^1.1.0"
|
||||||
|
|
||||||
|
tslib@^1.9.3:
|
||||||
|
version "1.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
||||||
|
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
|
||||||
|
|
||||||
typechecker@^4.3.0:
|
typechecker@^4.3.0:
|
||||||
version "4.7.0"
|
version "4.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-4.7.0.tgz#5249f427358f45b7250c4924fd4d01ed9ba435e9"
|
resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-4.7.0.tgz#5249f427358f45b7250c4924fd4d01ed9ba435e9"
|
||||||
|
|
59
src/typings/applicationinsights-web.d.ts
vendored
Normal file
59
src/typings/applicationinsights-web.d.ts
vendored
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
declare module '@microsoft/applicationinsights-web' {
|
||||||
|
export interface IConfig {
|
||||||
|
instrumentationKey?: string;
|
||||||
|
endpointUrl?: string;
|
||||||
|
emitLineDelimitedJson?: boolean;
|
||||||
|
accountId?: string;
|
||||||
|
sessionRenewalMs?: number;
|
||||||
|
sessionExpirationMs?: number;
|
||||||
|
maxBatchSizeInBytes?: number;
|
||||||
|
maxBatchInterval?: number;
|
||||||
|
enableDebug?: boolean;
|
||||||
|
disableExceptionTracking?: boolean;
|
||||||
|
disableTelemetry?: boolean;
|
||||||
|
verboseLogging?: boolean;
|
||||||
|
diagnosticLogInterval?: number;
|
||||||
|
samplingPercentage?: number;
|
||||||
|
autoTrackPageVisitTime?: boolean;
|
||||||
|
disableAjaxTracking?: boolean;
|
||||||
|
overridePageViewDuration?: boolean;
|
||||||
|
maxAjaxCallsPerView?: number;
|
||||||
|
disableDataLossAnalysis?: boolean;
|
||||||
|
disableCorrelationHeaders?: boolean;
|
||||||
|
correlationHeaderExcludedDomains?: string[];
|
||||||
|
disableFlushOnBeforeUnload?: boolean;
|
||||||
|
enableSessionStorageBuffer?: boolean;
|
||||||
|
isCookieUseDisabled?: boolean;
|
||||||
|
cookieDomain?: string;
|
||||||
|
isRetryDisabled?: boolean;
|
||||||
|
url?: string;
|
||||||
|
isStorageUseDisabled?: boolean;
|
||||||
|
isBeaconApiDisabled?: boolean;
|
||||||
|
sdkExtension?: string;
|
||||||
|
isBrowserLinkTrackingEnabled?: boolean;
|
||||||
|
appId?: string;
|
||||||
|
enableCorsCorrelation?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISnippet {
|
||||||
|
config: IConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IEventTelemetry {
|
||||||
|
name: string;
|
||||||
|
properties?: { [key: string]: string };
|
||||||
|
measurements?: { [key: string]: number };
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ApplicationInsights {
|
||||||
|
constructor(config: ISnippet);
|
||||||
|
loadAppInsights(): void;
|
||||||
|
trackEvent(data: IEventTelemetry): void;
|
||||||
|
flush(): void;
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,9 +24,6 @@
|
||||||
<body aria-label="">
|
<body aria-label="">
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<!-- Application insights telemetry library -->
|
|
||||||
<script src="https://az416426.vo.msecnd.net/scripts/a/ai.0.js"></script>
|
|
||||||
|
|
||||||
<!-- Require our AMD loader -->
|
<!-- Require our AMD loader -->
|
||||||
<script src="./out/vs/loader.js"></script>
|
<script src="./out/vs/loader.js"></script>
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
|
'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
|
||||||
'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
|
'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
|
||||||
'semver-umd': `${window.location.origin}/node_modules/semver-umd/lib/semver-umd.js`,
|
'semver-umd': `${window.location.origin}/node_modules/semver-umd/lib/semver-umd.js`,
|
||||||
|
'@microsoft/applicationinsights-web': `${window.location.origin}/node_modules/@microsoft/applicationinsights-web/dist/applicationinsights-web.js`,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -24,4 +25,4 @@
|
||||||
|
|
||||||
api.create(document.body, options);
|
api.create(document.body, options);
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -15,67 +15,10 @@ import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/pla
|
||||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||||
import { resolveWorkbenchCommonProperties } from 'vs/platform/telemetry/browser/workbenchCommonProperties';
|
import { resolveWorkbenchCommonProperties } from 'vs/platform/telemetry/browser/workbenchCommonProperties';
|
||||||
import { IProductService } from 'vs/platform/product/common/product';
|
import { IProductService } from 'vs/platform/product/common/product';
|
||||||
|
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
|
||||||
interface IConfig {
|
|
||||||
instrumentationKey?: string;
|
|
||||||
endpointUrl?: string;
|
|
||||||
emitLineDelimitedJson?: boolean;
|
|
||||||
accountId?: string;
|
|
||||||
sessionRenewalMs?: number;
|
|
||||||
sessionExpirationMs?: number;
|
|
||||||
maxBatchSizeInBytes?: number;
|
|
||||||
maxBatchInterval?: number;
|
|
||||||
enableDebug?: boolean;
|
|
||||||
disableExceptionTracking?: boolean;
|
|
||||||
disableTelemetry?: boolean;
|
|
||||||
verboseLogging?: boolean;
|
|
||||||
diagnosticLogInterval?: number;
|
|
||||||
samplingPercentage?: number;
|
|
||||||
autoTrackPageVisitTime?: boolean;
|
|
||||||
disableAjaxTracking?: boolean;
|
|
||||||
overridePageViewDuration?: boolean;
|
|
||||||
maxAjaxCallsPerView?: number;
|
|
||||||
disableDataLossAnalysis?: boolean;
|
|
||||||
disableCorrelationHeaders?: boolean;
|
|
||||||
correlationHeaderExcludedDomains?: string[];
|
|
||||||
disableFlushOnBeforeUnload?: boolean;
|
|
||||||
enableSessionStorageBuffer?: boolean;
|
|
||||||
isCookieUseDisabled?: boolean;
|
|
||||||
cookieDomain?: string;
|
|
||||||
isRetryDisabled?: boolean;
|
|
||||||
url?: string;
|
|
||||||
isStorageUseDisabled?: boolean;
|
|
||||||
isBeaconApiDisabled?: boolean;
|
|
||||||
sdkExtension?: string;
|
|
||||||
isBrowserLinkTrackingEnabled?: boolean;
|
|
||||||
appId?: string;
|
|
||||||
enableCorsCorrelation?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare class Microsoft {
|
|
||||||
public static ApplicationInsights: {
|
|
||||||
Initialization: {
|
|
||||||
new(init: { config: IConfig }): AppInsights;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
declare interface IAppInsightsClient {
|
|
||||||
config: IConfig;
|
|
||||||
|
|
||||||
/** Log a user action or other occurrence. */
|
|
||||||
trackEvent: (name: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) => void;
|
|
||||||
|
|
||||||
/** Immediately send all queued telemetry. Synchronous. */
|
|
||||||
flush(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AppInsights {
|
|
||||||
loadAppInsights: () => IAppInsightsClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class WebTelemetryAppender implements ITelemetryAppender {
|
export class WebTelemetryAppender implements ITelemetryAppender {
|
||||||
private _aiClient?: IAppInsightsClient;
|
private _aiClient?: ApplicationInsights;
|
||||||
|
|
||||||
constructor(aiKey: string, private _logService: ILogService) {
|
constructor(aiKey: string, private _logService: ILogService) {
|
||||||
const initConfig = {
|
const initConfig = {
|
||||||
|
@ -89,8 +32,8 @@ export class WebTelemetryAppender implements ITelemetryAppender {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const appInsights = new Microsoft.ApplicationInsights.Initialization(initConfig);
|
this._aiClient = new ApplicationInsights(initConfig);
|
||||||
this._aiClient = appInsights.loadAppInsights();
|
this._aiClient.loadAppInsights();
|
||||||
}
|
}
|
||||||
|
|
||||||
log(eventName: string, data: any): void {
|
log(eventName: string, data: any): void {
|
||||||
|
@ -101,7 +44,11 @@ export class WebTelemetryAppender implements ITelemetryAppender {
|
||||||
data = validateTelemetryData(data);
|
data = validateTelemetryData(data);
|
||||||
this._logService.trace(`telemetry/${eventName}`, data);
|
this._logService.trace(`telemetry/${eventName}`, data);
|
||||||
|
|
||||||
this._aiClient.trackEvent('monacoworkbench/' + eventName, data.properties, data.measurements);
|
this._aiClient.trackEvent({
|
||||||
|
name: 'monacoworkbench/' + eventName,
|
||||||
|
properties: data.properties,
|
||||||
|
measurements: data.measurements
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
flush(): Promise<void> {
|
flush(): Promise<void> {
|
||||||
|
@ -167,4 +114,4 @@ export class TelemetryService extends Disposable implements ITelemetryService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
registerSingleton(ITelemetryService, TelemetryService);
|
registerSingleton(ITelemetryService, TelemetryService);
|
||||||
|
|
|
@ -446,7 +446,8 @@
|
||||||
"**/vs/workbench/{common,browser}/**",
|
"**/vs/workbench/{common,browser}/**",
|
||||||
"**/vs/workbench/services/**/{common,browser}/**",
|
"**/vs/workbench/services/**/{common,browser}/**",
|
||||||
"vscode-textmate",
|
"vscode-textmate",
|
||||||
"onigasm-umd"
|
"onigasm-umd",
|
||||||
|
"@microsoft/applicationinsights-web"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
68
yarn.lock
68
yarn.lock
|
@ -95,6 +95,69 @@
|
||||||
lodash "^4.17.11"
|
lodash "^4.17.11"
|
||||||
to-fast-properties "^2.0.0"
|
to-fast-properties "^2.0.0"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-analytics-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-analytics-js/-/applicationinsights-analytics-js-2.1.1.tgz#6d09c1915f808026e2d45165d04802f09affed59"
|
||||||
|
integrity sha512-VKIutoFKY99CyKwxLUuj6Vnq14/QwXo9/QSQDpYnHEjo+uKn7QmLsHqWw0K9uYNfNAXt4BZimX/zDg6jZtzeXg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-channel-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-2.1.1.tgz#e205eddd93e49d17d9e0711a612b4bfc9810888f"
|
||||||
|
integrity sha512-fYr9IAqtaEr9AmaPaL3SLQVT3t3GQzl+n74gpNKyAVakDIm0nYQ/bimjdcAhJMDf1VGNSPg/xICneyuZg7Wxlg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-common@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-common/-/applicationinsights-common-2.1.1.tgz#27e6074584a7a3a8ca3f11f7ff2b7ff0f395bf2d"
|
||||||
|
integrity sha512-2hkS1Ia1FmAjCuYZ5JlG20/WgObqdsKtmK5YALAFGHIB4KSQ/Za1qazS+7GsG+E0F9UJivNWL1geUIcNqg5Qjg==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-core-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.1.1.tgz#30fb6a519cc1c6119c419c4811ce72c260217d9e"
|
||||||
|
integrity sha512-4t4wf6SKqIcWEQDPg/uOhm+BxtHhu/AFreyEoYZmMfcxzAu33h1FtTQRtxBNbYH1+thiNZCh80yUpnT7d9Hrlw==
|
||||||
|
dependencies:
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-dependencies-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-dependencies-js/-/applicationinsights-dependencies-js-2.1.1.tgz#8154c3efcb24617d015d0bce7c2cc47797a8d3c4"
|
||||||
|
integrity sha512-yhb4EToBp+aI+qLo0h5NDNtoo3sDFV60uyIOK843YjzXqVotcXX/lRShlghTkJtYH09QhrdzDjViUHnD4sMFSQ==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-properties-js@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-properties-js/-/applicationinsights-properties-js-2.1.1.tgz#ca34232766eb16167b5d87693e2ae5d94f2a1559"
|
||||||
|
integrity sha512-8l+/ppw6xKTam2RL4EHZ52Lcf217olw81j6kyBNKtIcGwSnLNHrFwEeF3vBWIteG2JKzlg1GhGjrkB3oxXsV2g==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
tslib "^1.9.3"
|
||||||
|
|
||||||
|
"@microsoft/applicationinsights-web@^2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-web/-/applicationinsights-web-2.1.1.tgz#1a44eddda7c244b88d9eb052dab6c855682e4f05"
|
||||||
|
integrity sha512-crvhCkNsNxkFuPWmttyWNSAA96D5FxBtKS6UA9MV9f9XHevTfchf/E3AuU9JZcsXufWMQLwLrUQ9ZiA1QJ0EWA==
|
||||||
|
dependencies:
|
||||||
|
"@microsoft/applicationinsights-analytics-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-channel-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-common" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-core-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-dependencies-js" "2.1.1"
|
||||||
|
"@microsoft/applicationinsights-properties-js" "2.1.1"
|
||||||
|
|
||||||
"@types/commander@^2.11.0":
|
"@types/commander@^2.11.0":
|
||||||
version "2.12.2"
|
version "2.12.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/commander/-/commander-2.12.2.tgz#183041a23842d4281478fa5d23c5ca78e6fd08ae"
|
resolved "https://registry.yarnpkg.com/@types/commander/-/commander-2.12.2.tgz#183041a23842d4281478fa5d23c5ca78e6fd08ae"
|
||||||
|
@ -8961,6 +9024,11 @@ tslib@^1.8.1, tslib@^1.9.0:
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
||||||
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
|
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
|
||||||
|
|
||||||
|
tslib@^1.9.3:
|
||||||
|
version "1.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
||||||
|
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
|
||||||
|
|
||||||
tslint@^5.16.0:
|
tslint@^5.16.0:
|
||||||
version "5.16.0"
|
version "5.16.0"
|
||||||
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.16.0.tgz#ae61f9c5a98d295b9a4f4553b1b1e831c1984d67"
|
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.16.0.tgz#ae61f9c5a98d295b9a4f4553b1b1e831c1984d67"
|
||||||
|
|
Loading…
Reference in a new issue