mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
add telemetry for add database reference quickpick (#22848)
This commit is contained in:
@@ -12,6 +12,7 @@ import { AddDatabaseReferenceSettings } from '../controllers/projectController';
|
|||||||
import { IDacpacReferenceSettings, IProjectReferenceSettings, ISystemDatabaseReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
import { IDacpacReferenceSettings, IProjectReferenceSettings, ISystemDatabaseReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
||||||
import { Project } from '../models/project';
|
import { Project } from '../models/project';
|
||||||
import { getSystemDatabase, getSystemDbOptions, promptDacpacLocation } from './addDatabaseReferenceDialog';
|
import { getSystemDatabase, getSystemDbOptions, promptDacpacLocation } from './addDatabaseReferenceDialog';
|
||||||
|
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -96,6 +97,10 @@ async function addProjectReference(otherProjectsInWorkspace: vscode.Uri[]): Prom
|
|||||||
const suppressErrors = await promptSuppressUnresolvedRefErrors();
|
const suppressErrors = await promptSuppressUnresolvedRefErrors();
|
||||||
referenceSettings.suppressMissingDependenciesErrors = suppressErrors;
|
referenceSettings.suppressMissingDependenciesErrors = suppressErrors;
|
||||||
|
|
||||||
|
TelemetryReporter.createActionEvent(TelemetryViews.ProjectTree, TelemetryActions.addDatabaseReference)
|
||||||
|
.withAdditionalProperties({ referenceType: constants.projectLabel })
|
||||||
|
.send();
|
||||||
|
|
||||||
return referenceSettings;
|
return referenceSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,6 +122,10 @@ async function addSystemDatabaseReference(project: Project): Promise<ISystemData
|
|||||||
// 4. Prompt suppress unresolved ref errors
|
// 4. Prompt suppress unresolved ref errors
|
||||||
const suppressErrors = await promptSuppressUnresolvedRefErrors();
|
const suppressErrors = await promptSuppressUnresolvedRefErrors();
|
||||||
|
|
||||||
|
TelemetryReporter.createActionEvent(TelemetryViews.ProjectTree, TelemetryActions.addDatabaseReference)
|
||||||
|
.withAdditionalProperties({ referenceType: constants.systemDatabase })
|
||||||
|
.send();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
databaseVariableLiteralValue: dbName,
|
databaseVariableLiteralValue: dbName,
|
||||||
systemDb: getSystemDatabase(selectedSystemDb),
|
systemDb: getSystemDatabase(selectedSystemDb),
|
||||||
@@ -184,6 +193,10 @@ async function addDacpacReference(project: Project): Promise<IDacpacReferenceSet
|
|||||||
|
|
||||||
populateResultWithVars(referenceSettings, dbServerValues);
|
populateResultWithVars(referenceSettings, dbServerValues);
|
||||||
|
|
||||||
|
TelemetryReporter.createActionEvent(TelemetryViews.ProjectTree, TelemetryActions.addDatabaseReference)
|
||||||
|
.withAdditionalProperties({ referenceType: constants.dacpacText })
|
||||||
|
.send();
|
||||||
|
|
||||||
return referenceSettings;
|
return referenceSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user