[SKU Recommendation] Adding telemetry for errors happening during data collection/ get recommendation and telemetry (#18345)

* Adding telemetry for errors happening during data collection/ telemetry for sku recommendation

* log and error happended during get sku recommendation

* Resolving comments from PR https://github.com/microsoft/azuredatastudio/pull/18252. 1) Adding click and close events to dispoable collection to avoid leaks. 2) Adding readable constant for number representing minutes.

* Changes - 1) updating migration workflow strings, 2) adding more onclick events to disposable collection.

* Remove PaaS, IaaS terms from string

* Changes -
1) Renamed 'Saved assessment result' to 'saved session'.
2) Removed Title from 'saved session' page.
3) Added stop data collection on migration start.
This commit is contained in:
Neetu Singh
2022-02-16 14:44:28 -08:00
committed by GitHub
parent 7ff42eeb08
commit 80c8b06ec8
6 changed files with 38 additions and 38 deletions

View File

@@ -22,6 +22,7 @@ export const WIZARD_INPUT_COMPONENT_WIDTH = '600px';
export class WizardController {
private _wizardObject!: azdata.window.Wizard;
private _model!: MigrationStateModel;
private _disposables: vscode.Disposable[] = [];
constructor(private readonly extensionContext: vscode.ExtensionContext, model: MigrationStateModel) {
this._model = model;
}
@@ -111,16 +112,16 @@ export class WizardController {
this._model.extensionContext.subscriptions.push(this._wizardObject.doneButton.onClick(async (e) => {
await stateModel.startMigration();
}));
saveAndCloseButton.onClick(async () => {
this._disposables.push(saveAndCloseButton.onClick(async () => {
await stateModel.saveInfo(serverName, this._wizardObject.currentPage);
await this._wizardObject.close();
if (stateModel.performanceCollectionInProgress()) {
void vscode.window.showInformationMessage(loc.SAVE_AND_CLOSE_POPUP);
}
});
}));
this._wizardObject.cancelButton.onClick(e => {
this._disposables.push(this._wizardObject.cancelButton.onClick(e => {
sendSqlMigrationActionEvent(
TelemetryViews.SqlMigrationWizard,
TelemetryAction.PageButtonClick,
@@ -129,11 +130,11 @@ export class WizardController {
'buttonPressed': TelemetryAction.Cancel,
'pageTitle': this._wizardObject.pages[this._wizardObject.currentPage].title
}, {});
});
}));
this._wizardObject.doneButton.label = loc.START_MIGRATION_TEXT;
this._wizardObject.doneButton.onClick(e => {
this._disposables.push(this._wizardObject.doneButton.onClick(e => {
sendSqlMigrationActionEvent(
TelemetryViews.SqlMigrationWizard,
TelemetryAction.PageButtonClick,
@@ -142,7 +143,7 @@ export class WizardController {
'buttonPressed': TelemetryAction.Done,
'pageTitle': this._wizardObject.pages[this._wizardObject.currentPage].title
}, {});
});
}));
}
private async sendPageButtonClickEvent(pageChangeInfo: azdata.window.WizardPageChangeInfo) {