Cross Component Trace (XCT)
Cross Component Trace (XCT) annotates the logs so that log entries related to a request that is serviced by more than one thread, process, or even server are identified as belonging to the same unit of work.
New feature:
XCT helps identify the root cause of problems across components, which provides the following benefits:
- Follow the flow of a request from end-to-end as it traverses thread or process boundaries, or travels between stack products and WebSphere Application Server.
- Resolve questions about which component is responsible for a request that fails.
newfeat
Administration of XCT
XCT is a capability built into the WAS log and trace framework. When enabled, XCT annotates the logs so that log entries related to a request that is serviced by more than one thread, process, or even server are identified as belonging to the same unit of work. Applications built using distributed architectures, such as Service Oriented Architecture, will benefit from XCT, since XCT helps facilitate problem determination across multiple services on different systems.
XCT modes:
- Fully disabled.
- XCT request IDs added to existing log and trace records.
- XCT request IDs added to existing log and trace records and XCT log records added to log files.
- XCT request IDs added to existing log and trace records, XCT log records added to log files, and data snapshots captured.
XCT request IDs can be added to log and trace records when the server is configured to use High Performance Extensible Logging (HPEL). We can view request IDs with the HPEL logViewer tool.
Example of an XCT log record in the log file:
[3/18/11 14:50:17:391 EDT] 00000031 XCT I BEGIN BJrcVPo+Yk4-AAAAAAA8zAA 00000000000-cccccccccc2 HTTPCF(OutboundRequest /index.html RemoteAddress(127.0.0.1) RequestContext(36001645))
Example rendered in advanced format:
[3/18/11 14:50:17:391 EDT] 00000018 W UOW= source=com.ibm.somelogger.QuickLogTest org= prod= component= thread=[WebContainer : 1] requestID=BJrcVPo+Yk4-AAAAAAA8zAA hello world
XCT log records:
- XCT log records are composed of:
- XCT type (BEGIN / END)
- XCT parent correlator ID (for example, 00000000000-cccccccccc2)
- XCT current correlator ID (for example, BJrcVPo+Yk4-AAAAAAA8zAA)
- XCT annotations (for example, HTTPCF(OutboundRequest /index.html RemoteAddress(127.0.0.1) RequestContext(36001645))
- XCT log records are typically added to the logs to:
- demarcate the beginning and ending of work for a particular request on a particular thread.
- demarcate when work is about to be transferred to another thread or process, or to indicate when work returned from another thread or process.
- demarcate when work moves from major component to major component, even if work continues on the same thread; for example to show transfer of control from application server code to application code.
XCT log viewer tools
- HPEL logViewer tool
Filter log and trace records by request ID.
- IBM WebSphere Cross Component Trace Logviewer
View XCT log records or XCT request IDs, or both. Available as a tool add-on for the IBM Support Assistant.
Related tasks
Enable Cross Component Trace
Use Cross Component Trace to troubleshoot applications