Fixing telemetry (#18616)

* Fix Telemetry

* Removing unused imports
This commit is contained in:
Neetu Singh
2022-03-03 11:39:52 -08:00
committed by GitHub
parent d5fa5fca3a
commit 4f61be2495
2 changed files with 1 additions and 12 deletions

View File

@@ -12,7 +12,6 @@ import * as constants from '../constants/strings';
import * as styles from '../constants/styles'; import * as styles from '../constants/styles';
import { WIZARD_INPUT_COMPONENT_WIDTH } from './wizardController'; import { WIZARD_INPUT_COMPONENT_WIDTH } from './wizardController';
import { deepClone, findDropDownItemIndex, selectDropDownIndex } from '../api/utils'; import { deepClone, findDropDownItemIndex, selectDropDownIndex } from '../api/utils';
import { sendSqlMigrationActionEvent, TelemetryAction, TelemetryViews } from '../telemtery';
export class TargetSelectionPage extends MigrationWizardPage { export class TargetSelectionPage extends MigrationWizardPage {
private _view!: azdata.ModelView; private _view!: azdata.ModelView;
@@ -131,17 +130,6 @@ export class TargetSelectionPage extends MigrationWizardPage {
public async onPageLeave(pageChangeInfo: azdata.window.WizardPageChangeInfo): Promise<void> { public async onPageLeave(pageChangeInfo: azdata.window.WizardPageChangeInfo): Promise<void> {
this.wizard.registerNavigationValidator((e) => { this.wizard.registerNavigationValidator((e) => {
sendSqlMigrationActionEvent(
TelemetryViews.MigrationWizardTargetSelectionPage,
TelemetryAction.OnPageLeave,
{
'sessionId': this.migrationStateModel?._sessionId,
'subscriptionId': this.migrationStateModel?._targetSubscription?.id,
'resourceGroup': this.migrationStateModel?._resourceGroup?.name,
'tenantId': this.migrationStateModel?._azureTenant?.id || this.migrationStateModel?._azureAccount?.properties?.tenants[0]?.id
}, {});
return true; return true;
}); });
} }

View File

@@ -165,6 +165,7 @@ export class WizardController {
'subscriptionId': this._model._targetSubscription?.id, 'subscriptionId': this._model._targetSubscription?.id,
'resourceGroup': this._model._resourceGroup?.name, 'resourceGroup': this._model._resourceGroup?.name,
'targetType': this._model._targetType, 'targetType': this._model._targetType,
'tenantId': this._model?._azureAccount?.properties?.tenants[0]?.id
}; };
} }
} }