You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Cloud SDK v3 via CAP nodejs v7 for making external calls. We have enabled logging with Kibana formatter by enabling the setting in CAP. We have bound application log service to the app when it is deployed to SAP BTP Cloud Foundry. The messages from CAP are logged in Kibana together with request logs from Cloud Foundry with correlation ID. Even the messages send from the CAP application have correlation ID headers and we are able to see messages for a request across the different apps and systems.
But messages from Cloud SDK are without correlation ID. They float around in Kibana and are not easily found. Cloud SDK logs warning messages like "WarningJWT: The provided JWT payload does not include a 'user_id' property." These messages are logged with no context and we are not able to understand the relevance of these messages without correlation with other messages.
How can we get Cloud SDK messages to be logged with correlation ID? They are already logged in Kibana format. But, without correlation with their context, these messages are pretty useless. We are not able to take heed of the warnings or locate reasons of errors.
Regards,
Dinu
The text was updated successfully, but these errors were encountered:
Hey @dinurp, this is a relevant feature request and we have discussed a similar issue in the past.
Back then we still supported node 12 and which would have made it quite difficult to pass a context (e.g. the correlation ID) around. Now with node 18, this should be possible, however the context would have to be passed to the execute() functions somehow. This is definitely possible, we just have to discuss priorities.
Passing additional parameters to execute() will need to be adopted by CAP to be useful to us. We will not be able to use it till then, just like we are not able to use resilience functionality now.
The correlation id is already in the request header when CAP makes the request, can't that be used? Can we configure somehow setting the logging format?
Is there a way I could configure SDK to use the same logger as used by CAP or something like cf-nodejs-logging-support that integrates with express to capture the request context?
We are using Cloud SDK v3 via CAP nodejs v7 for making external calls. We have enabled logging with Kibana formatter by enabling the setting in CAP. We have bound application log service to the app when it is deployed to SAP BTP Cloud Foundry. The messages from CAP are logged in Kibana together with request logs from Cloud Foundry with correlation ID. Even the messages send from the CAP application have correlation ID headers and we are able to see messages for a request across the different apps and systems.
But messages from Cloud SDK are without correlation ID. They float around in Kibana and are not easily found. Cloud SDK logs warning messages like "WarningJWT: The provided JWT payload does not include a 'user_id' property." These messages are logged with no context and we are not able to understand the relevance of these messages without correlation with other messages.
How can we get Cloud SDK messages to be logged with correlation ID? They are already logged in Kibana format. But, without correlation with their context, these messages are pretty useless. We are not able to take heed of the warnings or locate reasons of errors.
Regards,
Dinu
The text was updated successfully, but these errors were encountered: