ErrorDetector

ErrorDetector is a formerly separate Introscope extension which is fully integrated with Introscope.
apmdevops106
ErrorDetector is a formerly separate Introscope extension which is fully integrated with Introscope.
Introscope includes a ProbeBuilder Directive (PBD) file that is named
errors.pbd
with the agent installation. This file collects error information as defined in the
errors.pbd
file. To use this file to enable and configure error metrics, see Configure ErrorDetector
.
Error information also includes deep visibility components, which Introscope automatically discovers and instruments without the use of PBDs.
Smart instrumentation is available only for Java agents, not .NET agents.
When ErrorDetector is configured and enabled, Introscope allows application support personnel to:
  • Detect and diagnose the cause of serious errors as they occur in live applications.
  • Determine the frequency and nature of the errors.
  • Deliver specific information about the root cause to developers.
Some examples of common errors are:
  • HTTP errors (404, 500, and so on.)
  • SQL statement errors
  • Network connectivity errors (timeout errors)
  • Backend errors (for example, cannot send a message through JMS, cannot write a message to the message queue).
Introscope identifies these "serious" errors that are based on information that is contained in the J2EE and .NET specifications.
Occasionally, HTTP 404 errors originate in a web server instead of an application server. If this behavior occurs, ErrorDetector does not detect the web server error through the agent.
Introscope considers both errors and exceptions to be errors. The most common type of error is a thrown Java exception.
When smart instrumentation is enabled, Introscope automatically collects a transaction trace when an error occurs. Application errors that are configured to be ignored do not trigger automatic transaction traces. For more information, see Configure ErrorDetector.
Reading and Understanding Error Metrics
From the Workstation:
  • You can view error metric data in the Investigator.
  • You can view live errors in the Live Error Viewer.
  • You can view error details in the Error Snapshot, which shows component-level information about how the error occurred.
Viewing Error Metrics in the Investigator
The errors.pbd file generates Errors Per Interval metrics that appear under several of the default resources. Local Product produces Errors Per Interval metrics for:
J2EE resources such as J2EE connectors, servlets, JTA, and HTTP.
.NET framework resources such as ASP.NET pages, ADO.NET data sources, messaging queues, web mail, and enterprise services transactions.
View Error Data in the Live Error Viewer
To view live errors, select Workstation, New Live Error Viewer from a Workstation Console or Investigator window. The Live Error Viewer has two parts:
  • The Error Data Table, in the top part of the Live Error Viewer, lists errors currently occurring.
  • The Error Snapshot, in the lower part of the Live Error View shows the details for the error that is selected in the Error Data Table.
Error Data Table
The Error Data Table displays the following information for each error:
Column Name
Information
Agent
Agent name
Timestamp
Start time (based on the system clock) of the invocation of the root component.
Description
Type of component of the error. This value maps to the first segment of the resource name for the component:
  • For standard J2EE Blamed metrics, examples include Servlets, JSP, EJB, JNDI, and so on.
  • For .NET components, examples include Messaging and WebMail.
  • For custom tracer implementations, the category matches the first segment in the blamed method metric resource. If the metric resource has zero segments, the Description maps to "Custom Tracer."
Error Message
Exact error message captured.
  • Click a row to display an Error Snapshot for that error in the lower pane.
  • Click a column header to sort the rows by contents of that column. As new errors occur, they appear in sort order.
Error Stack View
Selecting an error in the Error Table pane causes its Error Stack View to appear in the lower pane.
The error message appears in red. When the error is a stall, the error message is Stalled Transaction. The tree shows where the error occurred in the component trace. Components are in shown in bold, followed by component data.
1471037.gif
You can copy a line of the Error Snapshot to include in an e-mail, report, or text message. To copy an error, click to select it, then use Ctrl + C to copy it.
You can examine an error snapshot to find a problem root cause.
The time values displayed in the Stack View are relative timestamps.
Introscope detects errors only when methods are instrumented using PBDs. When Introscope detects an error, the error snapshot displays deep visibility components in addition to components instrumented by PBDs. By looking at the methods branching down the tree in the error snapshot, you can determine the source of the error exception.
Example 1
Methods A, B, C, D, and E appear in an error snapshot tree. Methods A and E are instrumented using a PBD. Methods B, C, and D are instrumented using smart instrumentation.
Method E throws an error exception that is uncaught. The exception travels up the tree to Methods D, C, B, and A, none of which handle the exception. The error snapshot looks like this tree:
Deep visibility error snapshot example 1
Deep visibility error snapshot example 1
Example 2
Methods A, B, C, D, and E appear in an error snapshot tree. Methods A and B are instrumented using a PBD. Methods C, D, and E are instrumented using smart instrumentation.
Method E throws an error exception that is uncaught. The exception travels up the tree to Methods D, C, B, and A, none of which handle the exception. The error snapshot looks like this tree:
Deep visibility error snapshot example 2
Deep visibility error snapshot example 2
Example 3
Methods A, B, C, D, and E appear in an error snapshot tree. Methods A and B are instrumented using a PBD. Methods C, D, and E are instrumented using smart instrumentation.
Method E throws an error exception that is uncaught. The exception travels up the tree to Methods D, C, and B. Method B catches and handles the exception and no error was thrown. Introscope does not generate an error snapshot because Method B handled the exception.
Example 4
Methods A, B, C, D, and E appear in an error snapshot tree. Methods A and E are instrumented using a PBD. Methods B, C, and D are instrumented using smart instrumentation.
Method E stalls. The error snapshot looks like this tree:
Deep visibility error snapshot - stall example 1
Deep visibility error snapshot - stall example 1
Example 5
Methods A, B, C, D, and E appear in an error snapshot tree. Methods A and B are instrumented using a PBD. Methods C, D, and E are instrumented using smart instrumentation.
Method E stalls. The error snapshot looks like this tree:
Deep visibility error snapshot - stall example 2
Deep visibility error snapshot - stall example 2
Viewing and Analyzing Historical Error Data
The Transaction Event Database contains error and transaction trace data that is captured by the agent. You can view and analyze error information in the Transaction Event Database by querying for errors that are based on error attributes and text. You can expand your analysis by querying for errors that are similar to, or correlated to, a selected error. To query the Transaction Event Database, see Querying stored events.
View Errors Using the Transaction Tracer
You view errors that occur within a transaction using the Transaction Trace Viewer.
When smart instrumentation is enabled, Introscope automatically collects a transaction trace when an error occurs.
When an error triggers and automatic transaction trace, these component details display:
  • The component that threw the exception includes the component properties.
  • The first component in the transaction trace displays the Auto Trace Trigger Criteria property as Error.
Follow these steps:
  1. (Optional) Manually collect a transaction trace.
    1. Select Workstation, New Transaction Trace Session.
    2. In the Minimum transaction duration dialog, enter the length of the Transaction Trace session.
    3. In the Trace Agents section, select an option to define which agents to trace during the Transaction Trace session.
    4. In addition to other filtering options, select
      Errors
      and enter any error information to search on in the field.
    5. Click OK.
  2. View the transaction traces that contain errors in the Transaction Trace Viewer window.
    Occasionally, errors that have been tagged to be ignored appear in the Transaction Trace Viewer, but not in the Live Error Viewer. This behavior can occur when errors in the application appear before the agent has processed the ignore command in the IntroscopeAgent.profile.
    When you select a transaction in the table, the Transaction Snapshot appears. If an error occurred within the transaction, the background of the particular transaction snapshot appears in red in the Transaction Trace window.
  3. Click the error in the snapshot to display its details in the properties pane below the Transaction Snapshot.
You can select the text of any field in the properties details and can copy it using keyboard commands.
The default errors.pbd is designed to report serious errors, while minimizing overhead as much as possible. Overuse of error tracing, for instance, applying ExceptionErrorReporter to every monitored method can result in a high volume of "false positives." For example, if a user enters "California" in a numeric field, this value might cause a NumberFormatException, which you would not want to report as a serious problem.