Update ads-extension-telemetry to 1.3.1 (#20724)

* Update ads-extension-telemetry to 1.3.0

* fix
This commit is contained in:
Charles Gagnon
2022-10-04 23:06:53 -07:00
committed by GitHub
parent 08341c70fd
commit 60c1c8a89f
37 changed files with 92 additions and 130 deletions

View File

@@ -92,7 +92,7 @@
}
},
"dependencies": {
"@microsoft/ads-extension-telemetry": "^1.2.0",
"@microsoft/ads-extension-telemetry": "^1.3.1",
"htmlparser2": "^3.10.1",
"vscode-nls": "^4.0.0"
},

View File

@@ -11,7 +11,7 @@ const packageJson = require('../package.json');
let packageInfo = Utils.getPackageInfo(packageJson);
export const TelemetryReporter = new AdsTelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey);
export const TelemetryReporter = new AdsTelemetryReporter<TelemetryViews, TelemetryAction>(packageInfo.name, packageInfo.version, packageInfo.aiKey);
export enum TelemetryViews {
DataTierApplicationWizard = 'DataTierApplicationWizard'
@@ -23,5 +23,7 @@ export enum TelemetryAction {
GenerateDeployPlan = 'GenerateDeployPlan',
ExtractDacpac = 'ExtractDacpacOperation',
ExportBacpac = 'ExportBacpacOperation',
ImportBacpac = 'ImportBacpacOperation'
ImportBacpac = 'ImportBacpacOperation',
ConnectionDialogCancelled = 'ConnectionDialogCancelled',
WizardCanceled = 'WizardCanceled'
}

View File

@@ -115,7 +115,7 @@ export class DataTierApplicationWizard {
// don't open the wizard if connection dialog is cancelled
if (!this.connection) {
//Reporting Dacpac wizard cancelled event to Telemetry
TelemetryReporter.sendActionEvent(TelemetryViews.DataTierApplicationWizard, 'ConnectionDialogCancelled');
TelemetryReporter.sendActionEvent(TelemetryViews.DataTierApplicationWizard, TelemetryAction.ConnectionDialogCancelled);
return false;
}
}
@@ -305,7 +305,7 @@ export class DataTierApplicationWizard {
// Cancel button on click event is using to send the data loss information to telemetry
private cancelDataTierApplicationWizard(): void {
TelemetryReporter.createActionEvent(TelemetryViews.DataTierApplicationWizard, 'WizardCanceled')
TelemetryReporter.createActionEvent(TelemetryViews.DataTierApplicationWizard, TelemetryAction.WizardCanceled)
.withAdditionalProperties({
isPotentialDataLoss: this.model.potentialDataLoss?.toString(),
page: this.wizard.currentPage.toString(),
@@ -477,7 +477,7 @@ export class DataTierApplicationWizard {
return this.dacfxService;
}
private sendDacFxOperationTelemetryEvent(result: azdata.ResultStatus, telemetryAction: string, additionalProps: TelemetryEventProperties, additionalMeasurements: TelemetryEventMeasures): void {
private sendDacFxOperationTelemetryEvent(result: azdata.ResultStatus, telemetryAction: TelemetryAction, additionalProps: TelemetryEventProperties, additionalMeasurements: TelemetryEventMeasures): void {
if (result?.success) {
TelemetryReporter.createActionEvent(TelemetryViews.DataTierApplicationWizard, telemetryAction)
.withAdditionalProperties(additionalProps)

View File

@@ -200,10 +200,10 @@
"@microsoft/applicationinsights-shims" "^2.0.1"
"@microsoft/dynamicproto-js" "^1.1.6"
"@microsoft/ads-extension-telemetry@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-extension-telemetry/-/ads-extension-telemetry-1.2.0.tgz#f54e464ac887440727fe9862f8ff32be17aeab3a"
integrity sha512-dEp+RVJYo4uebMLvBJqJF8IABufJRp+PWHZx+3xe6SgAC37oYhcwR/glExhp3Nj3A2v3vjso6YQ/Wd5TG27FPQ==
"@microsoft/ads-extension-telemetry@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-extension-telemetry/-/ads-extension-telemetry-1.3.1.tgz#fa757ee88eac91b21c3a68562da6441c2ad15c39"
integrity sha512-8Zd7RwwN7ZufMoWFmc1bwzmQc1RV7/jf/Ua33YL1+P0ZwHoWFOhf/b0lwvAVzi9TB/7oD5zA5yv7A/i2sSTn6Q==
dependencies:
"@vscode/extension-telemetry" "^0.6.2"