mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
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:
@@ -11,6 +11,7 @@ export interface IPublishSettings {
|
||||
upgradeExisting: boolean;
|
||||
sqlCmdVariables?: Record<string, string>;
|
||||
deploymentOptions?: DeploymentOptions;
|
||||
profileUsed?: boolean;
|
||||
}
|
||||
|
||||
export interface IGenerateScriptSettings {
|
||||
@@ -18,4 +19,5 @@ export interface IGenerateScriptSettings {
|
||||
connectionUri: string;
|
||||
sqlCmdVariables?: Record<string, string>;
|
||||
deploymentOptions?: DeploymentOptions;
|
||||
profileUsed?: boolean;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import { Uri, window } from 'vscode';
|
||||
import { promises as fs } from 'fs';
|
||||
import { DataSource } from './dataSources/dataSources';
|
||||
import { ISystemDatabaseReferenceSettings, IDacpacReferenceSettings, IProjectReferenceSettings } from './IDatabaseReferenceSettings';
|
||||
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
||||
|
||||
/**
|
||||
* Class representing a Project, and providing functions for operating on it
|
||||
@@ -195,6 +196,8 @@ export class Project {
|
||||
return;
|
||||
}
|
||||
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.ProjectController, TelemetryActions.updateProjectForRoundtrip);
|
||||
|
||||
if (!this.importedTargets.includes(constants.NetCoreTargets)) {
|
||||
const result = await window.showWarningMessage(constants.updateProjectForRoundTrip, constants.yesString, constants.noString);
|
||||
if (result === constants.yesString) {
|
||||
@@ -387,6 +390,13 @@ export class Project {
|
||||
}
|
||||
|
||||
await this.serializeToProjFile(this.projFileXmlDoc);
|
||||
|
||||
TelemetryReporter.createActionEvent(TelemetryViews.ProjectTree, TelemetryActions.changePlatformType)
|
||||
.withAdditionalProperties({
|
||||
from: this.getProjectTargetVersion(),
|
||||
to: compatLevel
|
||||
})
|
||||
.send();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -854,6 +864,10 @@ export class Project {
|
||||
await this.addSystemDatabaseReference({ databaseName: databaseVariableName, systemDb: systemDb, suppressMissingDependenciesErrors: suppressMissingDependences });
|
||||
}
|
||||
}
|
||||
|
||||
TelemetryReporter.createActionEvent(TelemetryViews.ProjectController, TelemetryActions.updateSystemDatabaseReferencesInProjFile)
|
||||
.withAdditionalMeasurements({ referencesCount: this.projFileXmlDoc.documentElement.getElementsByTagName(constants.ArtifactReference).length })
|
||||
.send();
|
||||
}
|
||||
|
||||
private async addToProjFile(entry: ProjectEntry, xmlTag?: string, attributes?: Map<string, string>): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user