mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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',
|
generateProjectFromOpenApiSpec = 'generateProjectFromOpenApiSpec',
|
||||||
publishOptionsOpened = 'publishOptionsOpened',
|
publishOptionsOpened = 'publishOptionsOpened',
|
||||||
resetOptions = 'resetOptions',
|
resetOptions = 'resetOptions',
|
||||||
optionsChanged = 'optionsChanged'
|
optionsChanged = 'optionsChanged',
|
||||||
|
profileLoaded = 'profileLoaded'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import * as vscode from 'vscode';
|
|||||||
|
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { SqlConnectionDataSource } from '../dataSources/sqlConnectionStringSource';
|
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
|
// only reading db name, connection string, and SQLCMD vars from profile for now
|
||||||
export interface PublishProfile {
|
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
|
// get all SQLCMD variables to include from the profile
|
||||||
const sqlCmdVariables = utils.readSqlCmdVariables(profileXmlDoc, true);
|
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 {
|
return {
|
||||||
databaseName: targetDbName,
|
databaseName: targetDbName,
|
||||||
serverName: connectionInfo.server,
|
serverName: connectionInfo.server,
|
||||||
|
|||||||
Reference in New Issue
Block a user