From c3fb1e9842ae8cbc87cd4b4fe478277636bfca4a Mon Sep 17 00:00:00 2001 From: Nidhi Nair Date: Mon, 9 Sep 2024 10:30:47 +0530 Subject: [PATCH] chore: Added logs to allow capturing request id and processing for health related endpoints --- .../server/controllers/ce/HealthCheckControllerCE.java | 3 +++ .../com/appsmith/server/controllers/ce/TenantControllerCE.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/HealthCheckControllerCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/HealthCheckControllerCE.java index 12d6c1428fc..846514fd682 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/HealthCheckControllerCE.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/HealthCheckControllerCE.java @@ -6,11 +6,13 @@ import com.appsmith.server.services.HealthCheckService; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import reactor.core.publisher.Mono; +@Slf4j @RequestMapping(Url.HEALTH_CHECK) @AllArgsConstructor public class HealthCheckControllerCE { @@ -19,6 +21,7 @@ public class HealthCheckControllerCE { @JsonView(Views.Public.class) @GetMapping public Mono> getHealth() { + log.debug("Checking server health ..."); return healthCheckService.getHealth().map(health -> new ResponseDTO<>(HttpStatus.OK.value(), health, null)); } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/TenantControllerCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/TenantControllerCE.java index e4b4cbc0ba4..ba34d1029f4 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/TenantControllerCE.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/TenantControllerCE.java @@ -7,6 +7,7 @@ import com.appsmith.server.dtos.ResponseDTO; import com.appsmith.server.services.TenantService; import com.fasterxml.jackson.annotation.JsonView; +import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -16,6 +17,7 @@ import java.util.Map; +@Slf4j @RequestMapping(Url.TENANT_URL) public class TenantControllerCE { @@ -37,6 +39,7 @@ public TenantControllerCE(TenantService service) { @JsonView(Views.Public.class) @GetMapping("/current") public Mono> getTenantConfig() { + log.debug("Attempting to retrieve tenant configuration ... "); return service.getTenantConfiguration() .map(resource -> new ResponseDTO<>(HttpStatus.OK.value(), resource, null)); }