SAP / cf-java-logging-support

The Java Logging Support for Cloud Foundry supports the creation of structured log messages and the collection of request metrics
Apache License 2.0
75 stars 46 forks source link

Is there a specific documentation or example github repo for referring the cloud logging service, to implement in the java based CAP application #186

Closed EshwariChalmal closed 1 month ago

EshwariChalmal commented 1 month ago

We are implementing the cloud logging service in our java based CAP application. We have deployed our application using Kyma runtime. We didn't find any concrete documentation to implement it .It would great if you guys can provide some documentation.

KarstenSchnitter commented 1 month ago

Thanks for raising the issue. Now that SAP Cloud Logging is public GA, we should indeed add to the documentation.

There should be no difference when using cf-java-logging-support in the Kyma runtime environment over the CF runtime environment. Main difference between Cloud Logging and Application Logging is the handling of custom fields. For Cloud Logging, the declaration of fields as documented in https://github.com/SAP/cf-java-logging-support/wiki/Custom-Fields should be skipped. Cloud Logging will drop the #cf field generated for Application Logging.

Note, that CAP recommends the use of OpenTelemetry for observability data. Within Kyma, an OpenTelemetry gateway can be set up, similar to the traces and metrics gateway provided by Kyma Telemetry. There is an article on the integration with Cloud Logging: https://kyma-project.io/#/telemetry-manager/user/integration/sap-cloud-logging/README. This approach is going to be extended to logs.

For now, Kyma Telemetry will use Fluent Bit to ship logs to Cloud Logging supporting the JSON format produced by this library. Just configure your logging backend to write to stdout/stderr, as you would for CloudFoundry. Therefore, the documentation of this library applies for Kyma workloads, except for the custom fields as mentioned above.

EshwariChalmal commented 1 month ago

Thanks for giving the detailed information. We are facing the issue when configuring the SAML parameters. image As per the screen shot, what needs to be add in the "Assertion Consumer Service Endpoints" . We are following the document : https://pages.github.tools.sap/perfx/cloud-logging-service/how-to/integrate-scp-ias/ Please let me know what needs to be done

KarstenSchnitter commented 1 month ago

The SAML configuration is documented correctly in your linked document in section 4. If you are having trouble configuring SAP Cloud Logging please reach out to the team as described in the "contact" page of your documentation. I cannot provide support for this service within this logging support library. The link you are sharing is SAP internal documentation suggesting you should be able to reach the SAP Cloud Logging team quite easily over another channel.