mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Add telemetry for what users have in publish profile (#19805)
* add telemetry for what users have in publish profile * simplify check * add falsy checks
This commit is contained in:
@@ -44,5 +44,6 @@ export enum TelemetryActions {
|
||||
generateProjectFromOpenApiSpec = 'generateProjectFromOpenApiSpec',
|
||||
publishOptionsOpened = 'publishOptionsOpened',
|
||||
resetOptions = 'resetOptions',
|
||||
optionsChanged = 'optionsChanged'
|
||||
optionsChanged = 'optionsChanged',
|
||||
profileLoaded = 'profileLoaded'
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import * as vscode from 'vscode';
|
||||
|
||||
import { promises as fs } from 'fs';
|
||||
import { SqlConnectionDataSource } from '../dataSources/sqlConnectionStringSource';
|
||||
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../../common/telemetry';
|
||||
|
||||
// only reading db name, connection string, and SQLCMD vars from profile for now
|
||||
export interface PublishProfile {
|
||||
@@ -55,6 +56,13 @@ export async function load(profileUri: vscode.Uri, dacfxService: utils.IDacFxSer
|
||||
// get all SQLCMD variables to include from the profile
|
||||
const sqlCmdVariables = utils.readSqlCmdVariables(profileXmlDoc, true);
|
||||
|
||||
TelemetryReporter.createActionEvent(TelemetryViews.SqlProjectPublishDialog, TelemetryActions.profileLoaded)
|
||||
.withAdditionalProperties({
|
||||
hasTargetDbName: (!!targetDbName).toString(),
|
||||
hasConnectionString: (!!connectionInfo?.connectionId).toString(),
|
||||
hasSqlCmdVariables: (Object.keys(sqlCmdVariables).length > 0).toString()
|
||||
}).send();
|
||||
|
||||
return {
|
||||
databaseName: targetDbName,
|
||||
serverName: connectionInfo.server,
|
||||
|
||||
Reference in New Issue
Block a user