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
Hey @PierreFritsch, this functionality isn't currently built into the SDK logger, we have received a similar feature request in our own repository (as opposed to this one, which is only for the documentation) here.
If you are using our logger directly, however, you can of course get the correlation ID from the headers yourself and set it in the log context like this:
constcorrelationId=myRequest.headers.correlationIdHeader// Here you have to check which of your headers contains the correlation idsetLogLevel('error',`Correlation ID: ${correlationId}`);
Will the sap-cloud-sdk-logger from @sap-cloud-sdk/util output the incoming correlation ID to the logs?
If not, how can we pass the correlation ID ourselves to the logger?
I couldn't find a corresponding hint in the documentation.
Background: We're seeing log entries from our app in Kibana, seemingly written by this logger, that are not instrumented with a correlation_id.
Cross-link: Also asked this question on stackoverflow - https://stackoverflow.com/questions/77366185/sap-cloud-sdk-logger-support-for-correlation-id
The text was updated successfully, but these errors were encountered: