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:
- Enables administrators and support teams to 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.
- Helps to 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 different modes:
- Fully disabled.
- With XCT request IDs added to existing log and trace records.
- With XCT request IDs added to existing log and trace records and XCT log records added to log files.
- With XCT request IDs added to existing log and trace records, XCT log records added to log files, and data snapshots captured.
XCT request IDs:
- XCT request IDs are identifiers added to log and trace records produced by the server when the server is configured to use High Performance Extensible Logging (HPEL).
- XCT adds the same request ID to every log or trace record as long as the log or trace record is a part of the same request, regardless of which thread or Java virtual machine (JVM) produces the log or trace entry.
- When XCT is used with the HPEL log and trace infrastructure, we can view request IDs with the logViewer tool when logs are output in advanced format.
The following is an example of a log record with an XCT request ID in the log file (shown 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
Note that the request ID is shown previously on a separate line, but in the log files it is actually on the same line as the rest of the log record header.
XCT log records:
- 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.
The following is an 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))
- 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 tools:
- The HPEL logViewer tool is able to filter log and trace records by request ID.
- Tools, such as the IBM WebSphere Cross Component Trace Logviewer, can also take advantage of XCT log records or XCT request IDs, or both, when rendering log and trace content. The IBM WebSphere Cross Component Trace Logviewer is available as a tool add-on for the IBM Support Assistant.
XCT configuration:
We can configure XCT using wsadmin scripting.
Related tasks
Configure XCT with wsadmin scripting Concept topic