cf-java-logging-support icon indicating copy to clipboard operation
cf-java-logging-support copied to clipboard

Services using Custom metrics is not usable with all type of bindings

Open dimitarKiryakov opened this issue 2 years ago • 1 comments

Hello Colleagues, Currently, the feature of https://github.com/SAP/cf-java-logging-support#custom-metrics is very usable. Unfortunately due to this condition here: https://github.com/SAP/cf-java-logging-support/blob/master/cf-java-monitoring-custom-metrics-clients/cf-custom-metrics-clients-spring-boot/src/main/java/com/sap/cloud/cf/monitoring/spring/configuration/CustomMetricsCondition.java

service that does not use application-logging could not benefit from it. Please remove this condition in order for custom drainers for example([redacted]) to benefit from it in CF.

There is a workaround to predefine the autoconfigure annotation but it is a very ugly one.

dimitarKiryakov avatar Jan 04 '23 13:01 dimitarKiryakov

Hi,

thanks for reaching out. The support for custom metrics is highly specific to the SAP BTP Application Logging Service, where there is matching parsing in place. It is not intended to be used in other context, where superior solutions exist. These could e.g. be a metrics registry for Spring Boot, a Prometheus endpoint or additional instrumentation with OpenTelemetry. The custom metrics modules of cf-java-logging-support should not be used for these use-cases.

Best Regards, Karsten

KarstenSchnitter avatar Jan 04 '23 14:01 KarstenSchnitter