From cd77e98b2f0540abc5d490c48b742f45bc32a966 Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Mon, 2 Sep 2024 18:13:40 +0200 Subject: [PATCH 1/5] Document sidecar health indicators --- java/operating-applications/observability.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index b62caaafa..fa4419a81 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -274,7 +274,7 @@ Configure your application to enable the Open Telemetry Java Agent by adding or The buildpack delivers the Open Telemetry Agent Extension library with the common configuration for Open Telemetry that applies to Cloud Logging Service and Dynatrace. This library provides out-of-the box configuration of the required credentials taken from the service bindings and more sophisticated configuration possibilities. -[Learn more in the Open Telemetry Agent Extension library documentation](https://github.com/SAP/cf-java-logging-support/tree/main/cf-java-logging-support-opentelemetry-agent-extension){.learn-more} +[Learn more in the Open Telemetry Agent Extension library documentation](https://github.com/SAP/cf-java-logging-support/tree/main/cf-java-logging-support-opentelemetry-agent-extension){.learn-more} For troubleshooting purposes, you can increase the log level of the Open Telemetry Java Agent by adding the parameter `-Dotel.javaagent.debug=true` to the `JBP_CONFIG_JAVA_OPTS` argument. @@ -594,6 +594,16 @@ The example configuration makes Spring exposing only the health endpoint with he For multitenancy scenarios, CAP Java SDK replaces default the `db` indicator with an implementation that includes the status of all tenant databases. ::: +CAP offers two additional health indicators for MTX sidecars: + - `modelProvider` for the sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service) + - `deploymentService` for the sidecar backing [Multitenancy](/java/multitenancy#multitenancy) + +You can use them independently, but if both services use the same sidecar, health endpoint of the sidecar will receive calls from each health check independently. In this case, you can choose one of the indicators that best suit your application. + +::: warning +These health indicators require sidecar to use `@sap/cds` version 7.8.0 or higher. +::: + Endpoint `/actuator/health` delivers a response (HTTP response code `200` for up, `503` for down) in JSON format with the overall `status` property (for example, `UP` or `DOWN`) and the contributing components: ```json From 94dbe1ba165ad07f46d9e71fcf03f5b12e606809 Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Thu, 5 Sep 2024 11:25:05 +0200 Subject: [PATCH 2/5] Leave only one health indicator --- java/operating-applications/observability.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index fa4419a81..7f00bb2de 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -594,14 +594,10 @@ The example configuration makes Spring exposing only the health endpoint with he For multitenancy scenarios, CAP Java SDK replaces default the `db` indicator with an implementation that includes the status of all tenant databases. ::: -CAP offers two additional health indicators for MTX sidecars: - - `modelProvider` for the sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service) - - `deploymentService` for the sidecar backing [Multitenancy](/java/multitenancy#multitenancy) - -You can use them independently, but if both services use the same sidecar, health endpoint of the sidecar will receive calls from each health check independently. In this case, you can choose one of the indicators that best suit your application. +CAP offers additional health indicator for MTX sidecar with name `modelProvider` for the sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service). ::: warning -These health indicators require sidecar to use `@sap/cds` version 7.8.0 or higher. +Health indicator requires sidecar to use `@sap/cds` version 7.8.0 or higher. ::: Endpoint `/actuator/health` delivers a response (HTTP response code `200` for up, `503` for down) in JSON format with the overall `status` property (for example, `UP` or `DOWN`) and the contributing components: From d6f7cc4708828c2643f3b707b543cae1313bcc8a Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Thu, 5 Sep 2024 11:25:39 +0200 Subject: [PATCH 3/5] Fix --- java/operating-applications/observability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index 7f00bb2de..df714aae8 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -594,7 +594,7 @@ The example configuration makes Spring exposing only the health endpoint with he For multitenancy scenarios, CAP Java SDK replaces default the `db` indicator with an implementation that includes the status of all tenant databases. ::: -CAP offers additional health indicator for MTX sidecar with name `modelProvider` for the sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service). +CAP offers additional health indicator with name `modelProvider` for the MTX sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service). ::: warning Health indicator requires sidecar to use `@sap/cds` version 7.8.0 or higher. From d2dfa06b5f472ceb79d9b5cf782a662e655cf57d Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Thu, 5 Sep 2024 11:26:24 +0200 Subject: [PATCH 4/5] Fix --- java/operating-applications/observability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index df714aae8..fd92adcaf 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -594,7 +594,7 @@ The example configuration makes Spring exposing only the health endpoint with he For multitenancy scenarios, CAP Java SDK replaces default the `db` indicator with an implementation that includes the status of all tenant databases. ::: -CAP offers additional health indicator with name `modelProvider` for the MTX sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service). +CAP offers additional health indicator `modelProvider` for the MTX sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service). ::: warning Health indicator requires sidecar to use `@sap/cds` version 7.8.0 or higher. From 98cf493b388ef0c946afd8e9bc1fa4c750fd678e Mon Sep 17 00:00:00 2001 From: Marc Becker Date: Thu, 5 Sep 2024 13:51:20 +0200 Subject: [PATCH 5/5] Update observability.md --- java/operating-applications/observability.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index fd92adcaf..104e535b9 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -591,13 +591,19 @@ management: The example configuration makes Spring exposing only the health endpoint with health indicators `db` and `ping`. Other indicators ready for auto-configuration such as `diskSpace` are omitted. All components contributing to the aggregated status are shown individually, which helps to understand the reason for overall status `DOWN`. ::: tip -For multitenancy scenarios, CAP Java SDK replaces default the `db` indicator with an implementation that includes the status of all tenant databases. +For multitenancy scenarios, CAP Java replaces the default `db` indicator with an implementation that includes the status of all tenant databases. ::: -CAP offers additional health indicator `modelProvider` for the MTX sidecar backing [Model Provider Service](/java/reflection-api#the-model-provider-service). +In addition CAP Java offers a health indicator `modelProvider`. This health indicator allows to include the status of the MTX sidecar serving the [Model Provider Service](/java/reflection-api#the-model-provider-service). + +```yaml +management: + health: + modelProvider.enabled: true +``` ::: warning -Health indicator requires sidecar to use `@sap/cds` version 7.8.0 or higher. +The `modelProvider` health indicator requires `@sap/cds` version `7.8.0` or higher in MTX sidecar. ::: Endpoint `/actuator/health` delivers a response (HTTP response code `200` for up, `503` for down) in JSON format with the overall `status` property (for example, `UP` or `DOWN`) and the contributing components: