Automatically correlating transaction events
AssigneeInternational Business Machines Corporation
InventorAndrew Wilkins
Life of this patent
Estimating the term…
Abstract
An API can be extended to automatically correlate events based on context. Started events for each context (e.g. threads of execution) are maintained on independent stacks. When an instrumented application starts a new transaction, the API generates a started event. A transaction correlation unit within the API can determine if the new transaction started during a previous transaction. If there is a previous started event on the stack, the new transaction started during the previous transaction. The transaction correlation unit can insert an outbound indicator into the new started event to associate the new transaction and the previous transaction. Then, the new started event can be pushed on the stack.
Claims20
A computer implemented method comprising:
- detecting that a first transaction is ending;
- generating a finished event for the first transaction;
- determining if the first transaction started during a second transaction based, at least in part, on an outbound indicator of a first started event for the first transaction;
- inserting an inbound indicator identifying the second transaction into the finished event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- and
- removing the first started event from a data structure of started events.
A computer implemented method comprising:
- detecting that a first transaction has started;
- generating a first started event for the first transaction;
- determining if the first transaction started during a second transaction;
- inserting an outbound indicator identifying the second transaction into the first started event to indicate that the first transaction is a sub-transaction of the second transaction if it is determined that the first transaction started during the second transaction;
- storing the first started event in a data structure;
- detecting that the first transaction is ending;
- generating a finished event for the first transaction;
- determining if the first transaction started during the second transaction based, at least in part, on the outbound indicator of the first started event;
- inserting an inbound indicator identifying the second transaction into the finished event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- and
- removing the first started event from the data structure.
A computer program product for automatically correlating transaction events, the computer program product comprising:
- a non-transitory computer usable medium having computer usable program code embodied therewith, the computer usable program code comprising:
- computer usable program code configured to,
- detect that a first transaction is ending;
- generate a finished event for the first transaction;
- determine if the first transaction started during a second transaction based, at least in part, on an outbound indicator of a first started event for the first transaction;
- insert an inbound indicator identifying the second transaction into the finished event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- and
- remove the first started event from a data structure of started events.
A computer program product for automatically correlating transaction events, the computer program product comprising:
- a non-transitory computer usable medium having computer usable program code embodied therewith, the computer usable program code comprising:
- computer usable program code configured to,
- detect that a first transaction has started;
- generate a first started event for the first transaction;
- determine if the first transaction started during a second transaction;
- insert an outbound indicator identifying the second transaction into the first started event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- store the first started event in a data structure of started events;
- detect that the first transaction is ending;
- generate a finished event for the first transaction;
- determine if the first transaction started during the second transaction based, at least in part, on the outbound indicator of the first started event;
- insert an inbound indicator identifying the second transaction into the finished event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- and
- remove the first started event from the data structure.
A computer program product for automatically correlating transaction events, the computer program product comprising:
- a non-transitory computer usable medium having computer usable program code embodied therewith, the computer usable program code comprising:
- computer usable program code configured to,
- detect that a first transaction is ending;
- generate a finished event for the first transaction;
- determine if the first transaction started during a second transaction based, at least in part, on an outbound indicator of a started event for the first transaction, wherein the outbound indicator indicates the second transaction;
- insert an inbound indicator identifying the second transaction into the finished event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- and
- remove the started event from a data structure of started events.
An apparatus comprising:
- a processing unit;
- a network interface;
- and
- a transaction correlation unit operable to,
- detect that a first transaction is ending;
- generate a finished event for the first transaction;
- determine if the first transaction started during a second transaction based, at least in part, on an outbound indicator of a first started event for the first transaction;
- insert an inbound indicator identifying the second transaction into the finished event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- and
- remove the first started event from a data structure of started events.
An apparatus comprising:
- a processing unit;
- a network interface;
- and
- a transaction correlation unit operable to,
- detect that a first transaction has started;
- generate a first started event for the first transaction;
- determine if the first transaction started during a second transaction;
- insert an outbound indicator identifying the second transaction into the first started event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- store the first started event in a data structure;
- detect that the first transaction is ending;
- generate a finished event for the first transaction;
- determine if the first transaction started during a second transaction based, at least in part, on the outbound indicator of the first started event;
- insert an inbound indicator identifying the second transaction into the finished event to indicate that the first transaction is a sub-transaction of the second transaction if the first transaction started during the second transaction;
- and
- remove the first started event from the data structure.
Dependencies are inferred from the claim text.