From 3f0c8dccdfc828bbb6495cf6eb37a275ebe784a2 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Mon, 27 Feb 2023 19:47:38 +0530 Subject: [PATCH] chore: Add version information in instance_stats (#20937) --- .../appsmith/server/solutions/PingScheduledTaskImpl.java | 7 +++++-- .../server/solutions/ce/PingScheduledTaskCEImpl.java | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/PingScheduledTaskImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/PingScheduledTaskImpl.java index 5f64e304e3..cb552fecb1 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/PingScheduledTaskImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/PingScheduledTaskImpl.java @@ -1,6 +1,7 @@ package com.appsmith.server.solutions; import com.appsmith.server.configurations.CommonConfig; +import com.appsmith.server.configurations.ProjectProperties; import com.appsmith.server.configurations.SegmentConfig; import com.appsmith.server.repositories.ApplicationRepository; import com.appsmith.server.repositories.DatasourceRepository; @@ -33,7 +34,8 @@ public class PingScheduledTaskImpl extends PingScheduledTaskCEImpl implements Pi NewPageRepository newPageRepository, NewActionRepository newActionRepository, DatasourceRepository datasourceRepository, - UserRepository userRepository + UserRepository userRepository, + ProjectProperties projectProperties ) { super( @@ -45,7 +47,8 @@ public class PingScheduledTaskImpl extends PingScheduledTaskCEImpl implements Pi newPageRepository, newActionRepository, datasourceRepository, - userRepository + userRepository, + projectProperties ); } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/PingScheduledTaskCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/PingScheduledTaskCEImpl.java index dbb3abff31..643a863b4e 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/PingScheduledTaskCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/PingScheduledTaskCEImpl.java @@ -1,6 +1,7 @@ package com.appsmith.server.solutions.ce; import com.appsmith.server.configurations.CommonConfig; +import com.appsmith.server.configurations.ProjectProperties; import com.appsmith.server.configurations.SegmentConfig; import com.appsmith.server.helpers.NetworkUtils; import com.appsmith.server.repositories.ApplicationRepository; @@ -46,6 +47,8 @@ public class PingScheduledTaskCEImpl implements PingScheduledTaskCE { private final DatasourceRepository datasourceRepository; private final UserRepository userRepository; + private final ProjectProperties projectProperties; + /** * Gets the external IP address of this server and pings a data point to indicate that this server instance is live. * We use an initial delay of two minutes to roughly wait for the application along with the migrations are finished @@ -139,7 +142,9 @@ public class PingScheduledTaskCEImpl implements PingScheduledTaskCE { "numPages", statsData.getT5(), "numActions", statsData.getT6(), "numDatasources", statsData.getT7(), - "numUsers", statsData.getT8() + "numUsers", statsData.getT8(), + "version", projectProperties.getVersion(), + "edition", ProjectProperties.EDITION ), "event", "instance_stats" )))