Viewing a trace at the code level


Viewing the code level of a trace enables you to pinpoint the code behind the recorded instance. BMC Application Diagnostics drills down to the code of the trace. From the Code Level tab of the Trace Details window, you can see data related to request execution, such as the class and method name, return value, method arguments, method execution duration, a complete stack trace of exceptions, and technology-specific data (for example, SQL queries and HTTP request and response headers).

This topic presents the following procedures and feature descriptions:

To view the code section of a trace

  1. In the Traces window, click a trace name.
  2. In the Trace Details window, click the Code Level tab.
     The code section that is relevant to the selected trace is displayed.

The Details pane presents method parameters and details. For exceptions (errors), the complete stack trace is displayed.

If the trace has exceptions, the Exceptions pane is displayed on the left side of the window. To jump to the code section where an exception occurred, select an item in the pane.

Requests Tree and Requests Table

You can view the trace requests in a tree or in a table. In the upper right of the Code Level area, click the to see the Requests Table application_flow_icon_in_Code_level.pngor Requests Tree code_level_icon.png. The following images are examples of the Request Tree and Requests Table.

Requests Tree

trace_details_tree.png

Requests Table

trace_details_table.png

  • Double-click a line item to switch between the tree and the table.
    Methods with a yellow arrow are represented as a node in the Application Flow tab. A link appears in the Details pane. The following image shows the interface elements.

    trace_details_tree_link_to_appflow.png

    For a description of the nodes, see Viewing-the-application-flow-of-a-trace.

Stack traces for exceeded thresholds

The BMC Application Diagnostics Agent does not always recognize methods as interesting before they were invoked, but only after they exceed a defined threshold. Such methods are captured as part of stacks leading to service-level agreement (SLA) breaches, but no details are captured for these methods.

If the instance has latency violations, the full stack trace is shown by default. The methods are displayed in the Code Level views as a distinct node.

Stack trace exceeded threshold node

  ico_stack_trace_node.png

You can hide the stack trace by clearing Show stack trace for exceeded thresholds check box.

Filtering

In the Request Table application_flow_icon_in_Code_level.png, you can filter requests according to a string in the name, or according to the request duration.

To filter according to a matching string

  1. From the Method Call column, select Matching or Not matching.
  2. Enter all or part of a string.

    You can use the following wildcards:

    • * represents all single characters or any string.
    • ? represents exactly one character.

Only the matching results are displayed.

To filter according to duration

  1. From the Duration column, select a symbol from the list (>, <, =).
  2. Enter a whole number.

Only the matching results are displayed.

Searching

In the Request Tree code_level_icon.png, search for a string by entering it in the search box, located at the upper right side of the tree. The following image shows the search box on the Code Level tab.

Search box on the Code Level tab

codelevel_tree_search.png

The search results are displayed as bold text in the tree view and in the Details pane. If more than one match is found, you can view each matching result by using the Next and Previous arrows that are next to the search box.

Exporting to HTML

To export data to an HTML file, click Export to HTML. The HTML file contains the structure of the Request Tree and data on the methods, including duration, exception stack trace, level in the tree, and longest duration value. If the Show stack trace for exceeded thresholds option is selected when you export, then the methods in the stack trace are displayed in the HTML file and they are colored gray.

Save the HTML file to any destination folder, and open and view the file in a stand-alone browser or any other viewing software.

Related topics

Viewing-the-application-flow-of-a-trace
Method-trimming-and-stack-traces

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*