Product observability enables rapid debugging of product issues. The WSO2 Enterprise Service Bus (ESB) enables observability using correlation logs. Correlation logs allow you to monitor individual HTTP requests from the point that a message is received by the ESB until the corresponding response message is sent back to the original message sender. That is, the complete round trip of an HTTP message (client → ESB → back-end → ESB → client) can be tracked and anlyzed using a log file.
When correlation logs are enabled for the ESB server, a separate log file named correlation.log
is created in the <ESB_HOME>/repository/logs/
directory. Every HTTP message that flows through the ESB and between the ESB and external clients undergoes several state changes. A new log entry is created in the correlation.log
file corresponding to the state changes in the round trip of a single HTTP request. A correlation ID assigned to the incoming HTTP request is assigned to all the log entries corresponding to the request. Therefore, you can use this correlation ID to easily locate the logs relevant to the round trip of a specific HTTP request and, thereby, analyze the behaviour of the message flow.
Note | ||
---|---|---|
To use this feature in the current version of WSO2 ESB, you need to get the latest product updates for your product. This feature is available as a product update from 2019-01-04 onwards.
|
...
If you want correlation logs to be enabled every time the server starts, add the following system property to the product start-up script (stored in the
<ESB_HOME>/bin/
directory) and set it totrue
.Code Block -DenableCorrelationLogs=true \
Alternatively, you can pass the system property at the time of starting the server by executing the following command:
On Linux/MacOS/CentOS sh wso2server.sh
-DenableCorrelationLogs=
true
On Windows wso2server.bat
-DenableCorrelationLogs=
true
Now when you start the ESB server, the correlation.log
file is created in the <ESB_HOME>/repository/logs/
directory.
...