diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java index 0f6d77d1a2..b745b00c3b 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java @@ -10,6 +10,7 @@ import com.segment.analytics.messages.TrackMessage; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.digest.DigestUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import reactor.core.publisher.Mono; @@ -18,7 +19,6 @@ import java.util.HashMap; import java.util.Map; @Service -@RequiredArgsConstructor @Slf4j public class AnalyticsService { @@ -26,6 +26,14 @@ public class AnalyticsService { private final SessionUserService sessionUserService; private final CommonConfig commonConfig; + @Autowired + public AnalyticsService(@Autowired(required = false) Analytics analytics, + SessionUserService sessionUserService, + CommonConfig commonConfig) { + this.analytics = analytics; + this.sessionUserService = sessionUserService; + this.commonConfig = commonConfig; + } public boolean isActive() { return analytics != null; }