mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 09:35:38 -05:00
Add telemetry to troubleshoot customer issues (#17748)
* Add telemetry to troubleshoot customer issues * Updating logerror method calls with custom errors * Add performance telemetry
This commit is contained in:
@@ -13,6 +13,7 @@ import * as constants from '../constants/strings';
|
||||
import { IconPathHelper } from '../constants/iconPathHelper';
|
||||
import { WIZARD_INPUT_COMPONENT_WIDTH } from './wizardController';
|
||||
import { findDropDownItemIndex, selectDropDownIndex } from '../api/utils';
|
||||
import { logError, TelemetryViews } from '../telemtery';
|
||||
import { azureResource } from 'azureResource';
|
||||
import * as styles from '../constants/styles';
|
||||
|
||||
@@ -1233,7 +1234,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
selectDropDownIndex(this._networkShareStorageAccountResourceGroupDropdown, 0);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logError(TelemetryViews.DatabaseBackupPage, 'ErrorLoadingNetworkStorageResourceGroup', error);
|
||||
} finally {
|
||||
this._networkShareStorageAccountResourceGroupDropdown.loading = false;
|
||||
await this.loadNetworkShareStorageDropdown();
|
||||
@@ -1246,7 +1247,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
this._networkShareContainerStorageAccountDropdown.values = await this.migrationStateModel.getStorageAccountValues(this.migrationStateModel._databaseBackup.subscription, this.migrationStateModel._databaseBackup.networkShares[0].resourceGroup);
|
||||
selectDropDownIndex(this._networkShareContainerStorageAccountDropdown, 0);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logError(TelemetryViews.DatabaseBackupPage, 'ErrorLoadingNetworkShareStorageDropdown', error);
|
||||
} finally {
|
||||
this._networkShareContainerStorageAccountDropdown.loading = false;
|
||||
}
|
||||
@@ -1269,7 +1270,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logError(TelemetryViews.DatabaseBackupPage, 'ErrorLoadingBlobResourceGroup', error);
|
||||
} finally {
|
||||
this._blobContainerResourceGroupDropdowns.forEach(v => v.loading = false);
|
||||
}
|
||||
@@ -1289,7 +1290,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
selectDropDownIndex(this._blobContainerStorageAccountDropdowns[index], 0);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logError(TelemetryViews.DatabaseBackupPage, 'ErrorLoadingBlobStorageDropdown', error);
|
||||
} finally {
|
||||
this._blobContainerStorageAccountDropdowns[index].loading = false;
|
||||
}
|
||||
@@ -1310,7 +1311,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
selectDropDownIndex(this._blobContainerDropdowns[index], 0);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logError(TelemetryViews.DatabaseBackupPage, 'ErrorLoadingBlobContainers', error);
|
||||
} finally {
|
||||
this._blobContainerDropdowns[index].loading = false;
|
||||
}
|
||||
@@ -1331,7 +1332,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
selectDropDownIndex(this._blobContainerLastBackupFileDropdowns[index], 0);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logError(TelemetryViews.DatabaseBackupPage, 'ErrorLoadingBlobLastBackupFiles', error);
|
||||
} finally {
|
||||
this._blobContainerLastBackupFileDropdowns[index].loading = false;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import * as constants from '../constants/strings';
|
||||
import { WIZARD_INPUT_COMPONENT_WIDTH } from './wizardController';
|
||||
import { getFullResourceGroupFromId, getLocationDisplayName, getSqlMigrationService, getSqlMigrationServiceAuthKeys, getSqlMigrationServiceMonitoringData, SqlManagedInstance, SqlVMServer } from '../api/azure';
|
||||
import { IconPathHelper } from '../constants/iconPathHelper';
|
||||
import { logError, TelemetryViews } from '../telemtery';
|
||||
import { findDropDownItemIndex, selectDropDownIndex } from '../api/utils';
|
||||
import * as styles from '../constants/styles';
|
||||
|
||||
@@ -428,7 +429,7 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
try {
|
||||
await this.loadStatus();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logError(TelemetryViews.MigrationWizardIntegrationRuntimePage, 'ErrorLoadingMigrationServiceStatus', error);
|
||||
} finally {
|
||||
this._statusLoadingComponent.loading = false;
|
||||
}
|
||||
@@ -507,7 +508,7 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
await this._authKeyTable.setDataValues(data);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
logError(TelemetryViews.IntegrationRuntimePage, 'ErrorLoadingStatus', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { IntergrationRuntimePage } from './integrationRuntimePage';
|
||||
import { SummaryPage } from './summaryPage';
|
||||
import { MigrationModePage } from './migrationModePage';
|
||||
import { DatabaseSelectorPage } from './databaseSelectorPage';
|
||||
import { sendSqlMigrationActionEvent, TelemetryAction, TelemetryViews } from '../telemtery';
|
||||
import { sendSqlMigrationActionEvent, TelemetryAction, TelemetryViews, logError } from '../telemtery';
|
||||
import * as styles from '../constants/styles';
|
||||
|
||||
export const WIZARD_INPUT_COMPONENT_WIDTH = '600px';
|
||||
@@ -80,7 +80,7 @@ export class WizardController {
|
||||
this._model.extensionContext.subscriptions.push(this._wizardObject.onPageChanged(async (pageChangeInfo: azdata.window.WizardPageChangeInfo) => {
|
||||
const newPage = pageChangeInfo.newPage;
|
||||
const lastPage = pageChangeInfo.lastPage;
|
||||
this.sendPageButtonClickEvent(pageChangeInfo).catch(e => console.log(e));
|
||||
this.sendPageButtonClickEvent(pageChangeInfo).catch(e => logError(TelemetryViews.MigrationWizardController, 'ErrorSendingPageButtonClick', e));
|
||||
await pages[lastPage]?.onPageLeave(pageChangeInfo);
|
||||
await pages[newPage]?.onPageEnter(pageChangeInfo);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user