chore: Added logs to allow capturing request id and processing for he… (#36177)
This commit is contained in:
parent
58b07ddef6
commit
943cccc44e
|
|
@ -6,11 +6,13 @@ import com.appsmith.server.dtos.ResponseDTO;
|
||||||
import com.appsmith.server.services.HealthCheckService;
|
import com.appsmith.server.services.HealthCheckService;
|
||||||
import com.fasterxml.jackson.annotation.JsonView;
|
import com.fasterxml.jackson.annotation.JsonView;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
@RequestMapping(Url.HEALTH_CHECK)
|
@RequestMapping(Url.HEALTH_CHECK)
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class HealthCheckControllerCE {
|
public class HealthCheckControllerCE {
|
||||||
|
|
@ -19,6 +21,7 @@ public class HealthCheckControllerCE {
|
||||||
@JsonView(Views.Public.class)
|
@JsonView(Views.Public.class)
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public Mono<ResponseDTO<String>> getHealth() {
|
public Mono<ResponseDTO<String>> getHealth() {
|
||||||
|
log.debug("Checking server health ...");
|
||||||
return healthCheckService.getHealth().map(health -> new ResponseDTO<>(HttpStatus.OK.value(), health, null));
|
return healthCheckService.getHealth().map(health -> new ResponseDTO<>(HttpStatus.OK.value(), health, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import com.appsmith.server.domains.TenantConfiguration;
|
||||||
import com.appsmith.server.dtos.ResponseDTO;
|
import com.appsmith.server.dtos.ResponseDTO;
|
||||||
import com.appsmith.server.services.TenantService;
|
import com.appsmith.server.services.TenantService;
|
||||||
import com.fasterxml.jackson.annotation.JsonView;
|
import com.fasterxml.jackson.annotation.JsonView;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
|
@ -16,6 +17,7 @@ import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
@RequestMapping(Url.TENANT_URL)
|
@RequestMapping(Url.TENANT_URL)
|
||||||
public class TenantControllerCE {
|
public class TenantControllerCE {
|
||||||
|
|
||||||
|
|
@ -37,6 +39,7 @@ public class TenantControllerCE {
|
||||||
@JsonView(Views.Public.class)
|
@JsonView(Views.Public.class)
|
||||||
@GetMapping("/current")
|
@GetMapping("/current")
|
||||||
public Mono<ResponseDTO<Tenant>> getTenantConfig() {
|
public Mono<ResponseDTO<Tenant>> getTenantConfig() {
|
||||||
|
log.debug("Attempting to retrieve tenant configuration ... ");
|
||||||
return service.getTenantConfiguration()
|
return service.getTenantConfiguration()
|
||||||
.map(resource -> new ResponseDTO<>(HttpStatus.OK.value(), resource, null));
|
.map(resource -> new ResponseDTO<>(HttpStatus.OK.value(), resource, null));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user