Telemetry points for SQL Database Projects extension (#14088)

* Added publish and schema compare telemetry
* Adding telemetry points for add/exclude/delete
* telemetry for validation
* Adding telemetry from project roundtrip updates, editing sqlproj, and db refs
* Changed method for obtaining extension ID during registration
* Fixing test failures, updating ads telemetry package dependency
* replacing action strings with enums
* change database project string actions to enums
* Changed action name to better match dialog
* PR feedback
This commit is contained in:
Benjin Dubishar
2021-01-31 16:38:48 -08:00
committed by GitHub
parent 15fa03876d
commit 1c0259f4c5
19 changed files with 239 additions and 71 deletions

View File

@@ -15,6 +15,7 @@ import { DeploymentOptions, SchemaObjectType } from '../../../mssql/src/mssql';
import { IconPathHelper } from '../common/iconHelper';
import { cssStyles } from '../common/uiConstants';
import { getConnectionName } from './utils';
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
interface DataSourceDropdownValue extends azdata.CategoryValue {
dataSource: SqlConnectionDataSource;
@@ -40,6 +41,7 @@ export class PublishDatabaseDialog {
private connectionIsDataSource: boolean | undefined;
private sqlCmdVars: Record<string, string> | undefined;
private deploymentOptions: DeploymentOptions | undefined;
private profileUsed: boolean = false;
private toDispose: vscode.Disposable[] = [];
@@ -48,7 +50,7 @@ export class PublishDatabaseDialog {
public readPublishProfile: ((profileUri: vscode.Uri) => any) | undefined;
constructor(private project: Project) {
this.dialog = azdata.window.createModelViewDialog(constants.publishDialogName);
this.dialog = azdata.window.createModelViewDialog(constants.publishDialogName, 'sqlProjectPublishDialog');
this.publishTab = azdata.window.createTab(constants.publishDialogName);
}
@@ -184,7 +186,8 @@ export class PublishDatabaseDialog {
upgradeExisting: true,
connectionUri: await this.getConnectionUri(),
sqlCmdVariables: this.getSqlCmdVariablesForPublish(),
deploymentOptions: await this.getDeploymentOptions()
deploymentOptions: await this.getDeploymentOptions(),
profileUsed: this.profileUsed
};
azdata.window.closeDialog(this.dialog);
@@ -194,12 +197,15 @@ export class PublishDatabaseDialog {
}
public async generateScriptClick(): Promise<void> {
TelemetryReporter.sendActionEvent(TelemetryViews.SqlProjectPublishDialog, TelemetryActions.generateScriptClicked);
const sqlCmdVars = this.getSqlCmdVariablesForPublish();
const settings: IGenerateScriptSettings = {
databaseName: this.getTargetDatabaseName(),
connectionUri: await this.getConnectionUri(),
sqlCmdVariables: sqlCmdVars,
deploymentOptions: await this.getDeploymentOptions()
deploymentOptions: await this.getDeploymentOptions(),
profileUsed: this.profileUsed
};
azdata.window.closeDialog(this.dialog);