Skip to content

Commit a37d531

Browse files
committed
Using operation for function telemetry tracking
1 parent c0c988c commit a37d531

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/function/action/CreateFunctionAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ protected PsiElement[] invokeDialog(Project project, PsiDirectory psiDirectory)
8282
PsiDirectory directory = ClassUtil.sourceRoot(psiDirectory);
8383
String newName = packageName.replace('.', '/');
8484
bindingTemplate = AzureFunctionsUtils.getFunctionTemplate(triggerType);
85-
EventUtil.logEvent(EventType.info, FUNCTION, CREATE_FUNCTION_TRIGGER, new HashMap<String, String>() {{
86-
put("triggerType", triggerType);
87-
}});
85+
operation.trackProperty("triggerType", triggerType);
8886
if (StringUtils.equalsIgnoreCase(triggerType, CreateFunctionForm.EVENT_HUB_TRIGGER)) {
8987
if (StringUtils.isBlank(connectionName)) {
9088
throw new AzureExecutionException(message("function.createFunction.error.connectionMissed"));

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/function/wizard/module/FunctionsModuleBuilder.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,8 @@ public void setupRootModel(@NotNull final ModifiableRootModel rootModel) {
119119
final String version = wizardContext.getUserData(AzureFunctionsConstants.WIZARD_VERSION_KEY);
120120
final String packageName = wizardContext.getUserData(AzureFunctionsConstants.WIZARD_PACKAGE_NAME_KEY);
121121
final String[] triggers = wizardContext.getUserData(AzureFunctionsConstants.WIZARD_TRIGGERS_KEY);
122-
EventUtil.logEvent(EventType.info, FUNCTION, CREATE_FUNCTION_PROJECT, new HashMap<String, String>() {{
123-
put("tool", tool);
124-
put("triggerType", StringUtils.join(triggers, ","));
125-
}});
122+
operation.trackProperty("tool", tool);
123+
operation.trackProperty("triggerType", StringUtils.join(triggers, ","));
126124
File tempProjectFolder = null;
127125
try {
128126
tempProjectFolder = AzureFunctionsUtils.createFunctionProjectToTempFolder(groupId, artifactId, version, tool);

0 commit comments

Comments
 (0)