cloud-cap-samples-java icon indicating copy to clipboard operation
cloud-cap-samples-java copied to clipboard

Demonstrate Spring-Boot health probes in Cloudfoundry

Open mofterdinger opened this issue 1 year ago • 2 comments

This PR demonstrates the liveness and readiness health probes in Cloudfoundry as described here: https://docs.cloudfoundry.org/devguide/deploy-apps/healthchecks.html

mofterdinger avatar Oct 16 '24 08:10 mofterdinger

Need to validate first in BTP if it works as expected.

mofterdinger avatar Oct 16 '24 09:10 mofterdinger

Successfully tested on BTP: https://cdsnode-cdsjava-testing-bookshop-app.cfapps.sap.hana.ondemand.com/

mofterdinger avatar Oct 16 '24 17:10 mofterdinger

Could we merge this, or is this blocked by something?

beckermarc avatar Nov 25 '24 08:11 beckermarc

Yes, I will merge it. Did a final test on BTP:

2024-11-25T08:56:19.632+0000 [CELL/0] STDOUT Container became healthy 2024-11-25T08:56:19.653+0000 [API/7] STDOUT Process became ready with guid 8073c70c-7f98-4a8c-9dec-5259077be89d payload: {"instance"=>"29c6bf1c-519c-4160-5a4a-fee0", "index"=>0, "cell_id"=>"0004a099-1bdc-4be4-85c9-41549a83b021", "ready"=>true, "version"=>"a99b4df6-f7b1-4eed-a56c-cbdde7cfbf92"} 2024-11-25T08:56:19.765+0000 [APP/PROC/WEB/0] STDOUT {"categories":["request"],"request":"/actuator/health/liveness","request_size_b":-1,"logger":"com.sap.hcp.cf.logging.servlet.filter.RequestLogger","type":"request","layer":"[SERVLET]","protocol":"HTTP/1.1","remote_ip":"redacted","response_content_type":"application/vnd.spring-boot.actuator.v3+json;charset=UTF-8","x_forwarded_proto":"redacted","request_received_at":"2024-11-25T08:56:19.759831478Z","written_at":"2024-11-25T08:56:19.764Z","response_time_ms":4.299273,"direction":"IN","response_sent_at":"2024-11-25T08:56:19.764130751Z","component_id":"8073c70c-7f98-4a8c-9dec-5259077be89d","response_status":200,"method":"GET","level":"INFO","response_size_b":15,"written_ts":"1732524979764495848","component_name":"bookshop-srv","remote_port":"redacted","thread":"http-nio-8080-exec-3","organization_name":"cdsnode","remote_host":"redacted","space_name":"cdsjava","organization_id":"00d5b022-3e6c-4dd9-b683-babafa1ea0fe","correlation_id":"7a777d56-450f-4552-96a3-03a228399d5e","space_id":"6668d010-5b91-4cc0-9230-2c287fba150c","container_id":"10.36.198.4"}

mofterdinger avatar Nov 25 '24 09:11 mofterdinger