From 530a571ba0252735e9617625d3e47079f8ea169d Mon Sep 17 00:00:00 2001 From: Nayan Date: Wed, 22 Jun 2022 23:10:22 +0600 Subject: [PATCH] chore: send whether the app was published manually to the analytics event (#14728) Sends an attribute along with publish app analytics event to denote whether this was a manual publish or automated publish. --- .../server/services/ce/ApplicationPageServiceCEImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java index 00a955ff5c..8f822ee8f6 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java @@ -1000,13 +1000,14 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE { publishedActionCollectionsListMono, publishThemeMono ) - .then(sendApplicationPublishedEvent(publishApplicationAndPages, publishedActionsListMono, publishedActionCollectionsListMono, applicationId)); + .then(sendApplicationPublishedEvent(publishApplicationAndPages, publishedActionsListMono, publishedActionCollectionsListMono, applicationId, isPublishedManually)); } private Mono sendApplicationPublishedEvent(Mono> publishApplicationAndPages, Mono> publishedActionsFlux, Mono> publishedActionsCollectionFlux, - String applicationId) { + String applicationId, + boolean isPublishedManually) { return Mono.zip( publishApplicationAndPages, publishedActionsFlux, @@ -1023,6 +1024,7 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE { extraProperties.put("appId", defaultIfNull(application.getId(), "")); extraProperties.put("appName", defaultIfNull(application.getName(), "")); extraProperties.put("orgId", defaultIfNull(application.getWorkspaceId(), "")); + extraProperties.put("isManual", defaultIfNull(isPublishedManually, "")); extraProperties.put("publishedAt", defaultIfNull(application.getLastDeployedAt(), "")); return analyticsService.sendObjectEvent(AnalyticsEvents.PUBLISH_APPLICATION, application, extraProperties);