chore: Add version information in instance_stats (#20937)

This commit is contained in:
Shrikant Sharat Kandula 2023-02-27 19:47:38 +05:30 committed by GitHub
parent 51816565ec
commit 3f0c8dccdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -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
);
}
}

View File

@ -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"
)))