Methods, systems, and computer program products for correlating trace
events to facilitate analysis based on how the trace events are related.
Relationship information that defines relationships between logical
operations is maintained within a correlation identifier stack. A
correlation identifier that marks the occurrence of a logical operation
is obtained for executing software and stored in the correlation
identifier stack. A trace event is generated that comprises both the
correlation identifier stack and an initial event payload to describe the
runtime behavior of the executing software. The trace event is stored to
a trace log for subsequent analysis of the executing software based on
the logical operation relationship information in the correlation
identifier stack and the initial correlation identifier that marks the
occurrence of the logical operation. Upon obtaining an indication that
the logical operation has ended, the correlation identifier is removed
from the correlation identifier stack.