mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 18:48:45 -05:00
Fixes zone.js monkey patching by application-insights
This commit is contained in:
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1,14 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "gitlens",
|
"name": "gitlens",
|
||||||
"version": "3.6.0",
|
"version": "3.6.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/applicationinsights": {
|
|
||||||
"version": "0.15.33",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/applicationinsights/-/applicationinsights-0.15.33.tgz",
|
|
||||||
"integrity": "sha1-yohXeRuaxSzlKplCXksJrRfrlwg=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"@types/copy-paste": {
|
"@types/copy-paste": {
|
||||||
"version": "1.1.30",
|
"version": "1.1.30",
|
||||||
"resolved": "https://registry.npmjs.org/@types/copy-paste/-/copy-paste-1.1.30.tgz",
|
"resolved": "https://registry.npmjs.org/@types/copy-paste/-/copy-paste-1.1.30.tgz",
|
||||||
@@ -28,9 +22,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "7.0.27",
|
"version": "7.0.28",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.27.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.28.tgz",
|
||||||
"integrity": "sha512-2QMiuVOEye2yKmMwE1V96C9HSShmT0WSm6dv2WjacvePEjQNNJGAerTO5hdYhj5lpdK5MW+FVxmyzDhr4omIdw==",
|
"integrity": "sha512-9rLhvgupMpC7Yh24yB8zj+4L6SZ9BYUwqknEC8+R7gqCg3KL65UHg7yu9X6J8mSmmtVr1Hbey564yZ3C9nXqtQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/tmp": {
|
"@types/tmp": {
|
||||||
@@ -1784,9 +1778,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tslint": {
|
"tslint": {
|
||||||
"version": "5.4.2",
|
"version": "5.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.4.3.tgz",
|
||||||
"integrity": "sha1-YJtmQMwEJPSjlamt9ow3VWPFScc=",
|
"integrity": "sha1-dhyEArgONHt3M6BDkKdXslNYBGc=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tsutils": {
|
"tsutils": {
|
||||||
|
|||||||
@@ -916,14 +916,13 @@
|
|||||||
"tmp": "0.0.31"
|
"tmp": "0.0.31"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/applicationinsights": "0.15.33",
|
|
||||||
"@types/copy-paste": "1.1.30",
|
"@types/copy-paste": "1.1.30",
|
||||||
"@types/iconv-lite": "0.0.1",
|
"@types/iconv-lite": "0.0.1",
|
||||||
"@types/mocha": "2.2.41",
|
"@types/mocha": "2.2.41",
|
||||||
"@types/node": "7.0.27",
|
"@types/node": "7.0.28",
|
||||||
"@types/tmp": "0.0.33",
|
"@types/tmp": "0.0.33",
|
||||||
"mocha": "3.4.2",
|
"mocha": "3.4.2",
|
||||||
"tslint": "5.4.2",
|
"tslint": "5.4.3",
|
||||||
"typescript": "2.3.4",
|
"typescript": "2.3.4",
|
||||||
"vscode": "1.1.0"
|
"vscode": "1.1.0"
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/@types/applicationinsights/index.d.ts
vendored
14
src/@types/applicationinsights/index.d.ts
vendored
@@ -16,9 +16,9 @@ interface AutoCollectConsole {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface AutoCollectExceptions {
|
interface AutoCollectExceptions {
|
||||||
constructor(client:Client): AutoCollectExceptions;
|
constructor(client: Client): AutoCollectExceptions;
|
||||||
isInitialized(): boolean;
|
isInitialized(): boolean;
|
||||||
enable(isEnabled:boolean): void;
|
enable(isEnabled: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AutoCollectPerformance {
|
interface AutoCollectPerformance {
|
||||||
@@ -348,7 +348,7 @@ interface Client {
|
|||||||
* @param max the max sample for this set
|
* @param max the max sample for this set
|
||||||
* @param stdDev the standard deviation of the set
|
* @param stdDev the standard deviation of the set
|
||||||
*/
|
*/
|
||||||
trackMetric(name: string, value: number, count?:number, min?: number, max?: number, stdDev?: number, properties?: {
|
trackMetric(name: string, value: number, count?: number, min?: number, max?: number, stdDev?: number, properties?: {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
}): void;
|
}): void;
|
||||||
|
|
||||||
@@ -374,7 +374,8 @@ interface Client {
|
|||||||
* @param error An error that was returned for this request if it was unsuccessful. Defaults to null.
|
* @param error An error that was returned for this request if it was unsuccessful. Defaults to null.
|
||||||
*/
|
*/
|
||||||
trackRequestSync(request: any /*http.IncomingMessage */, response: any /*http.ServerResponse */, ellapsedMilliseconds?: number, properties?: {
|
trackRequestSync(request: any /*http.IncomingMessage */, response: any /*http.ServerResponse */, ellapsedMilliseconds?: number, properties?: {
|
||||||
[key: string]: string;}, error?: any) : void;
|
[key: string]: string;
|
||||||
|
}, error?: any): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log information about a dependency of your app. Typically used to track the time database calls or outgoing http requests take from your server.
|
* Log information about a dependency of your app. Typically used to track the time database calls or outgoing http requests take from your server.
|
||||||
@@ -503,6 +504,11 @@ interface ApplicationInsights {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
setOfflineMode(value: boolean, resentIntervall?: number): ApplicationInsights;
|
setOfflineMode(value: boolean, resentIntervall?: number): ApplicationInsights;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
setAutoDependencyCorrelation(value: boolean): ApplicationInsights;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "applicationinsights" {
|
declare module "applicationinsights" {
|
||||||
|
|||||||
@@ -13,15 +13,21 @@ export class Telemetry extends Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static setContext(context?: { [key: string]: string }) {
|
static setContext(context?: { [key: string]: string }) {
|
||||||
_reporter && _reporter.setContext(context);
|
if (_reporter === undefined) return;
|
||||||
|
|
||||||
|
_reporter.setContext(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static trackEvent(name: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number; }) {
|
static trackEvent(name: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number; }) {
|
||||||
_reporter && _reporter.trackEvent(name, properties, measurements);
|
if (_reporter === undefined) return;
|
||||||
|
|
||||||
|
_reporter.trackEvent(name, properties, measurements);
|
||||||
}
|
}
|
||||||
|
|
||||||
static trackException(ex: Error) {
|
static trackException(ex: Error) {
|
||||||
_reporter && _reporter.trackException(ex);
|
if (_reporter === undefined) return;
|
||||||
|
|
||||||
|
_reporter.trackException(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,11 +50,12 @@ export class TelemetryReporter {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this._client = this.appInsights.setup(key)
|
this._client = this.appInsights.setup(key)
|
||||||
.setAutoCollectConsole(false)
|
|
||||||
.setAutoCollectDependencies(false)
|
|
||||||
.setAutoCollectExceptions(false)
|
|
||||||
.setAutoCollectPerformance(false)
|
|
||||||
.setAutoCollectRequests(false)
|
.setAutoCollectRequests(false)
|
||||||
|
.setAutoCollectPerformance(false)
|
||||||
|
.setAutoCollectExceptions(false)
|
||||||
|
.setAutoCollectDependencies(false)
|
||||||
|
.setAutoCollectConsole(false)
|
||||||
|
.setAutoDependencyCorrelation(false)
|
||||||
.setOfflineMode(true)
|
.setOfflineMode(true)
|
||||||
.start()
|
.start()
|
||||||
.client;
|
.client;
|
||||||
|
|||||||
Reference in New Issue
Block a user