Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16,201 changes: 9,573 additions & 6,628 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@
"webpack-cli": "^5.1.4"
},
"dependencies": {
"@vscode/extension-telemetry": "^0.8.4",
"axios": "^1.5.0",
"iconv-lite": "^0.6.3",
"jsonfile": "^6.1.0",
"uuid": "^9.0.0",
"vscode-extension-telemetry": "^0.4.5",
"vsls": "^1.0.4753"
}
}
8 changes: 4 additions & 4 deletions src/IISExpress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as telemtry from './telemetry';
// External libraries
import { v4 as uuidv4 } from 'uuid';
import * as iconv from 'iconv-lite';
import TelemetryReporter from 'vscode-extension-telemetry';
import TelemetryReporter from '@vscode/extension-telemetry';


export interface IExpressArguments {
Expand Down Expand Up @@ -109,7 +109,7 @@ export class IISExpress {
process.execFileSync(this._iisAppCmdPath, ['add', 'site', `-name:${siteName}`, `-bindings:${this._args.protocol}://localhost:${this._args.port}`, `-physicalPath:${this._args.path}`]);
} catch (error:any) {
console.log(error);
this._reporter.sendTelemetryException(error, {"appCmdPath": this._iisAppCmdPath, "appCmd": `add site -name:${siteName} -bindings:${this._args.protocol}://localhost:${this._args.port} -physicalPath:${this._args.path}`});
this._reporter.sendTelemetryErrorEvent(error, {"appCmdPath": this._iisAppCmdPath, "appCmd": `add site -name:${siteName} -bindings:${this._args.protocol}://localhost:${this._args.port} -physicalPath:${this._args.path}`});
}

// Based on the CLR chosen use the correct built in AppPools shipping with IISExpress
Expand All @@ -121,7 +121,7 @@ export class IISExpress {
process.execFileSync(this._iisAppCmdPath, ['set', 'app', `/app.name:${siteName}/`, `/applicationPool:${appPool}`]);
} catch (error:any) {
console.log(error);
this._reporter.sendTelemetryException(error, {"appCmdPath": this._iisAppCmdPath});
this._reporter.sendTelemetryErrorEvent(error, {"appCmdPath": this._iisAppCmdPath});
}

// Log telemtry
Expand Down Expand Up @@ -183,7 +183,7 @@ export class IISExpress {
process.execFileSync(this._iisAppCmdPath, ['delete', 'site', `${siteName}`]);
} catch (error:any) {
console.log(error);
this._reporter.sendTelemetryException(error, {"appCmdPath": this._iisAppCmdPath, "appCmd": `delete site ${siteName}`});
this._reporter.sendTelemetryErrorEvent(error, {"appCmdPath": this._iisAppCmdPath, "appCmd": `delete site ${siteName}`});
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/credentials.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as vscode from 'vscode';
import axios from 'axios';
import TelemetryReporter from 'vscode-extension-telemetry';
import TelemetryReporter from '@vscode/extension-telemetry';

// The GitHub Authentication Provider accepts the scopes described here:
// https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/
Expand Down Expand Up @@ -107,7 +107,7 @@ export class Credentials {
// console.log("Error", error.message);
// }

this.reporter?.sendTelemetryException(error);
this.reporter?.sendTelemetryErrorEvent(error); // May not work or be happy :S
isValidSponsor = false;
this.outputWindow.appendLine(`[Credentials] Error determining if user ${accountLabel} is a valid sponsor`);
this.outputWindow.appendLine(`[ERROR] ${error}`);
Expand Down
14 changes: 9 additions & 5 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import * as vsls from 'vsls';
import TelemetryReporter from 'vscode-extension-telemetry';
import TelemetryReporter from '@vscode/extension-telemetry';

import * as iis from './IISExpress';
import * as verify from './verification';
Expand All @@ -16,18 +16,22 @@ import { Sponsorware } from './sponsorware';
let iisExpressServer:iis.IISExpress;

// all events will be prefixed with this event name
const extensionId = 'iis-express';
// const extensionId = 'iis-express';

// extension version will be reported as a property with each event
const pkgJson = require('../package.json');
const extensionVersion = pkgJson.version;
//const pkgJson = require('../package.json');
//const extensionVersion = pkgJson.version;

// the application insights key (also known as instrumentation key)
const key = 'e0cc903f-73ec-4216-92cd-3479696785b2';

// telemetry reporter
// create telemetry reporter on extension activation
const reporter:TelemetryReporter = new TelemetryReporter(extensionId, extensionVersion, key);

// TODO: Previously passed in the version and the extension name - NEED to investigae source code repo
// https://github.com/microsoft/vscode-extension-telemetry
// TODO: Test with new Azure AppInsights key to check data going in OK
const reporter:TelemetryReporter = new TelemetryReporter(key);

const iisOutputWindow = vscode.window.createOutputChannel('IIS Express (Logs)');

Expand Down
2 changes: 1 addition & 1 deletion src/sponsorware.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as vscode from 'vscode';
import path = require('path');
import { Credentials } from './credentials';
import TelemetryReporter from 'vscode-extension-telemetry';
import TelemetryReporter from '@vscode/extension-telemetry';

export class Sponsorware {

Expand Down
2 changes: 1 addition & 1 deletion src/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as vscode from 'vscode';
import TelemetryReporter from 'vscode-extension-telemetry';
import TelemetryReporter from '@vscode/extension-telemetry';

export enum keys {
start = 'start',
Expand Down