This Application is related to U.S. Patent Application titled “Transaction Tracer,” by Lewis K. Cirne and Daryl L. Puryear, U.S. patent application Ser. No. 10/381,272, filed on the Dec. 12, 2002, which is incorporated by reference in its entirety.
1. Field of the Invention
The present invention is directed to technology for a user interface that is used to view information about transactions in a computing environment.
2. Description of the Related Art
As the Internet's popularity grows, more businesses are establishing a presence on the Internet. These businesses typically set up web sites that run one or more web applications. One disadvantage of doing business on the Internet is that if the web site goes down, makes an error, becomes unresponsive or otherwise is not properly serving customers, the business is losing potential sales and/or customers. Similar issues exist with Intranets and Extranets. Thus, there is a need to monitor live web applications and web sites to make sure that they are running properly.
One particular scenario that web application developers seek to avoid is a task that stalls, makes an error or otherwise has a bug. To debug software with a bug or task that stalls, the developer or administrator usually attempts to figure out which code is causing the bug or stall so that code can be fixed to avoid future issues. While it is usually easy to detect when an application is stalling or not working because the performance of the application becomes noticeably slower, the application stops functioning or the application produces undesired results, it is often very difficult to determine which portion of the software is responsible for the stall. And, even if a developer can determine in which method, function, routine, process, etc. that the application was being performed when the problem occurred, it is not clear whether the problem was because of that method, function, routine, process, etc. or another method, function, routine, process, etc called by that method, function, routine, process, etc.
Thus, there is a need to improve the ability to determine which portion of the software is responsible for problems in an application.
The present invention, roughly described, pertains to technology for a user interface that is used to view information about transactions. For example, the present invention can be used to determine which component of a transaction running in a software application is causing a performance problem.
The user interface accesses data about a transaction. The transaction has a set of traced component invocations. A graphical representation of the components of the transaction is displayed. In one embodiment, the graphical representation includes a time axis and a call stack position axis. The time axis depicts time left to right and the call stack position axis depicts call stack position top to bottom. In some embodiments, the user interface can receive a selection of one of the components, access data for the selected component and display additional details about that selected component.
One embodiment of the user interface is used with a transaction tracer. Other embodiments are used with data providing mechanisms other than a transaction tracer. One example of a transaction tracer allows a user to specify a threshold trace period and initiate transaction tracing on one, some, or all transactions running on a software system. Transactions with an execution time that exceeds the threshold trace period are reported to the user using the graphical user interface. The graphical user interface lists transactions exceeding the specified threshold and provides the ability to display a visualization for each reported transaction that enables the user to immediately understand where time was spent in the traced transaction.
The present invention can be accomplished using hardware, software, or a combination of both hardware and software. The software used for the present invention is stored on one or more processor readable storage media including hard disk drives, CD-ROMs, DVDs, optical disks, floppy disks, tape drives, RAM, ROM or other suitable storage devices. In alternative embodiments, some or all of the software can be replaced by dedicated hardware including custom integrated circuits, gate arrays, FPGAs, PLDs, and special purpose computers. In one embodiment, software implementing the present invention is used to program one or more processors. The processors can be in communication with one or more storage devices, peripherals and/or communication interfaces.
These and other objects and advantages of the present invention will appear more clearly from the following description in which the preferred embodiment of the invention has been set forth in conjunction with the drawings.
The present invention is directed to tracing transactions to identify which components of a transaction may be executing too slow. In one embodiment, the system traces transactions in order to identify those transactions that have an execution time greater than a threshold time. A transaction is a method, process, procedure, function, thread, set of instructions, etc. for performing a task. In one embodiment, the present invention is used to monitor methods in a Java environment. In that embodiment, a transaction is a method invocation in a running software system that enters the Java Virtual Machine (“JVM”) and exits the JVM (and all that it calls). In one embodiment, the system described below can initiate transaction tracing on one, some, or all transactions managed by the system. A user, or another entity, can specify a threshold trace period. All transactions whose root level execution time exceeds the threshold trace period are reported. In one embodiment, the reporting will be performed by a Graphical User Interface (“GUI”) that lists all transactions exceeding the specified threshold. For each listed transaction, a visualization can be provided that enables the user to immediately understand where time was being spent in the traced transaction. Although the implementation described below is based on a Java application, the present invention can be used with other programming languages, paradigms and/or environments.
There are many ways to implement the present invention. One example is to implement the present invention within an application performance management tool. One embodiment of such an application performance management tool monitors performance of an application by having access to the source code and modifying that source code. Sometimes, however, the source code is not available. Another type of tool performs application performance management without requiring access to or modification of the application's source code. Rather, the tool instruments the application's object code (also called bytecode).
Probe Builder 4 instruments (e.g. modifies) the bytecode for Application 2 to add probes and additional code to Application 2 in order to create Application 6. The probes measure specific pieces of information about the application without changing the application's business logic. Probe Builder 4 also installs Agent 8 on the same machine as Application 6. Once the probes have been installed in the bytecode, the Java application is referred to as a managed application. More information about instrumenting byte code can be found in U.S. Pat. No. 6,260,187 “System For Modifying Object Oriented Code” by Lewis K. Cirne, incorporated herein by reference in its entirety.
One embodiment of the present invention instruments bytecode by adding new code that activates a tracing mechanism when a method starts and terminates the tracing mechanism when the method completes. To better explain this concept consider the following example pseudo code for a method called “exampleMethod.” This method receives an integer parameter, adds 1 to the integer parameter, and returns the sum:
One embodiment of the present invention will instrument this code, conceptually, by including a call to a tracer method, grouping the original instructions from the method in a “try” block and adding a “finally” block with a code that stops the tracer:
IMethodTracer is an interface that defines a tracer for profiling. AMethodTracer is an abstract class that implements IMethodTracer. IMethodTracer includes the methods startTrace and finishTrace. AMethodTracer includes the methods startTrace, finishTrace, dostartTrace and dofinishTrace. The method startTrace is called to start a tracer, perform error handling and perform setup for starting the tracer. The actual tracer is started by the method doStartTrace, which is called by startTrace. The method finishTrace is called to stop the tracer and perform error handling. The method finishTrace calls doFinishTrace to actually stop the tracer. Within AMethodTracer, startTrace and finishTracer are final and void methods; and doStartTrace and doFinishTrace are protected, abstract and void methods. Thus, the methods doStartTrace and do FinishTrace must be implemented in subclasses of AMethodTracer. Each of the subclasses of AMethodTracer implement the actual tracers. The method loadTracer is a static method that calls startTrace and includes five parameters. The first parameter, “com.introscope . . . ” is the name of the class that is intended to be instantiated that implements the tracer (e.g. discussed below—see
The above example shows source code being instrumented. In one embodiment, the present invention doesn't actually modify source code. Rather, the present invention modifies object code. The source code examples above are used for illustration to explain the concept of the present invention. The object code is modified conceptually in the same manner that source code modifications are explained above. That is, the object code is modified to add the functionality of the “try” block and “finally” block. More information about such object code modification can be found in U.S. patent application Ser. No. 09/795,901, “Adding Functionality To Existing Code At Exits,” filed on Feb. 28, 2001, incorporated herein by reference in its entirety. In another embodiment, the source code can be modified as explained above.
In one embodiment of the system of
In one embodiment, a user of the system in
In step 206 of
As noted above, the Agents perform the tracing of the transactions. To perform such tracing, the Agents leverage what is called Blame technology. Blame Technology works in a managed Java Application to enable the identification of component interactions and component resource usage. Blame Technology tracks components that are specified to it. Blame Technology uses the concepts of consumers and resources. Consumers request some activity; resources perform the activity. A component can be both a consumer and a resource, depending on the context.
When reporting about transactions, the word Called designates a resource. This resource is a resource (or a sub-resource) of the parent component, which is the consumer. For example, under the consumer Servlet A (see below), there may be a sub-resource Called EJB. Consumers and resources can be reported in a tree-like manner. Data for a transaction can also be stored according to the tree. For example, if a Servlet (e.g. Servlet A) is a consumer of a network socket (e.g. Socket C) and is also a consumer of an EJB (e.g. EJB B), which is a consumer of a JDBC (e.g. JDBC D), the tree might look something like the following:
In one embodiment, the above tree is stored by the Agent in a stack. This stack is called the Blame Stack. When transactions are started, they are pushed onto the stack. When transactions are completed, they are popped off the stack. In one embodiment, each transaction on the stack has the following information stored: type of transaction, a name used by the system for that transaction, a hash map of parameters, a timestamp for when the transaction was pushed onto the stack, and sub-elements. Sub-elements are Blame Stack entries for other components (e.g. methods, process, procedure, function, thread, set of instructions, etc.) that are started from within the transaction of interest. Using the tree as an example above, the Blame Stack entry for Servlet A would have two sub-elements. The first sub-element would be an entry for EJB B and the second sub-element would be an entry for Socket Space C. Even though a sub-element is part of an entry for a particular transaction, the sub-element will also have its own Blame Stack entry. As the tree above notes, EJB B is a sub-element of Servlet A and also has its own entry. The top (or initial) entry (e.g., Servlet A) for a transaction, is called the root component. Each of the entries on the stack is an object. While the embodiment described herein includes the use of Blame technology and a stack, other embodiments of the present invention can use different types of stack, different types of data structures, or other means for storing information about transactions.
In step 306, the system acquires a timestamp indicating the current time. In step 308, a stack entry is created. In step 310, the stack entry is pushed onto the Blame Stack. In one embodiment, the timestamp is added as part of step 310. The process of
Note, in one embodiment, if the transaction tracer is off, the system will still use the Blame Stack; however, parameters will not be stored and no component data will be created. In some embodiments, the system defaults to starting with the tracing technology off. The tracing only starts after a user requests it, as described above.
While the tracing is being performed, a user can stop the tracing and restart the tracing in real time by selecting buttons in the GUI. For example,
In one embodiment, the Agents have anti-flooding logic that places a default limit on the number of transactions traced for time interval. For example, there may be a default limit of 200 transactions traced in a 15 second period. After this limit has been exceeded, the Agent will log that the anti-flood threshold was exceeded and will stop reporting transaction data until the 15 second period has expired, at which point transaction tracing resumes. Although the example uses a limit of 200 transactions traced in a 15-second period, other limits can also be used. The anti-flooding level can be adjusted by changing information in a configuration file, on a GUI, in a profile, etc.
Each transaction that has an execution time greater than the threshold time period will appear in the transaction trace table 500. The user can select any of the transactions in the transaction trace table by clicking with the mouse or using a different means for selecting a row. When a transaction is selected, detailed information about that transaction will be displayed in transaction snapshot 502 and snapshot header 504.
Transaction snapshot 502 provides information about which transactions are called and for how long. Transaction snapshot 502 includes views (see the rectangles) for various transactions, which will be discussed below. If the user positions a mouse (or other pointer) over any of the views, mouse-over info box 506 is provided. Mouse-over info box 506 indicates the following information for a component: name/type, duration, timestamp and percentage of the transaction time that the component was executing. More information about transaction snapshot 502 will be explained below. Transaction snapshot header 504 includes identification of the Agent providing the selected transaction, the timestamp of when that transaction was initiated, and the duration. Transaction snapshot header 504 also includes a slider to zoom in or zoom out the level of detail of the timing information in transaction snapshot 502. The zooming can be done in real time.
In addition to the transaction snapshot, the GUI will also provide additional information about any of the transactions within the transaction snapshot 502. If the user selects any of the transactions (e.g., by clicking on a view), detailed information about that transaction is provided in regions 508, 510, and 512 of the GUI. Region 508 provides component information, including the type of component, the name the system has given to that component and a path to that component. Region 510 provides analysis of that component, including the duration the component was executing, a timestamp for when that component started relative to the start of the entire transaction, and an indication the percentage of the transaction time that the component was executing. Region 512 includes indication of any properties. These properties are one or more of the parameters that are stored in the Blame Stack, as discussed above.
The GUI also includes a status bar 514. The status bar includes indication 516 of how many transactions are in the transaction trace table, indication 518 of how much time is left for tracing based on the session length, stop button 520 (discussed above), and restart button 522 (discussed above).
The transaction snapshot provides for the visualization of time from left to right and the visualization of the call stack top to bottom. Clicking on any view allows the user to see more details about the selected component. A user can easily see which particular component is causing a transaction to run too slowly. That is, if a transaction is too slow, it is likely that one of the subcomponents is running significantly longer than the other subcomponents. The user can see which subcomponent is running longest and attempt to debug that particular subcomponent.
The user interface of
The above discussion contemplates that the filter used by the Agent to determine whether to report a transaction is based on execution time. In other embodiments, other tests can be used. Examples of other tests include choosing based on UserID, provide a random sample, report any transaction whose execution time varies by a standard deviation, etc.
The foregoing detailed description of the invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. The described embodiments were chosen in order to best explain the principles of the invention and its practical application to thereby enable others skilled in the art to best utilize the invention in various embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims appended hereto.
This application claims the benefit of U.S. Provisional Application No. 60/419,689, “Web Application Monitoring,” filed on Oct. 18, 2002, which is incorporated herein by reference in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
4774681 | Frisch | Sep 1988 | A |
5375199 | Harrow et al. | Dec 1994 | A |
5426730 | Miyake et al. | Jun 1995 | A |
5655081 | Bonnell et al. | Aug 1997 | A |
5862381 | Advanti et al. | Jan 1999 | A |
5898873 | Lehr | Apr 1999 | A |
5978594 | Bonnell et al. | Nov 1999 | A |
5996092 | Augsburg et al. | Nov 1999 | A |
6141699 | Luzzi et al. | Oct 2000 | A |
6263298 | Kerman et al. | Jul 2001 | B1 |
6266805 | Nwana et al. | Jul 2001 | B1 |
6282701 | Wygodny et al. | Aug 2001 | B1 |
6332212 | Organ et al. | Dec 2001 | B1 |
6611276 | Muratori et al. | Aug 2003 | B1 |
20020198985 | Fraenkel et al. | Dec 2002 | A1 |
20030065986 | Fraenkel et al. | Apr 2003 | A1 |
20040068560 | Oulu et al. | Apr 2004 | A1 |
20040215762 | Oulu et al. | Oct 2004 | A1 |
20040215768 | Oulu et al. | Oct 2004 | A1 |
Number | Date | Country |
---|---|---|
1024430 | Aug 2000 | EP |
Number | Date | Country | |
---|---|---|---|
20040075690 A1 | Apr 2004 | US |
Number | Date | Country | |
---|---|---|---|
60419689 | Oct 2002 | US |