Capture errors for custom code

Document ID : KB000073575
Last Modified Date : 20/03/2018
Show Technical Document Details
  How do I capture errors for custom code?
   Applies to all current APM versions
  The 'Advance Error Data Capture' provides the following error-related tracers to capture custom errors. 

   Refer to following section of the APM Guide for more detailed information on using the tracers to capture custom errors:

Advanced Error Data Capture

Although ErrorDetector captures many common error types by default, We provide options for customizing error detection.

You can use the following error-related tracers to create ProbeBuilder Directives (PBDs) to capture errors.

  • ExceptionErrorReporter reports standard exceptions.
  • MethodCalledErrorReporter reports when specific methods get called.
  • ThisErrorReporter reports a current object as an error.
  • HTTPErrorCodeReporter captures HTTP error codes and associated error messages.

Place any new directives that you create with the tracers in the errors.pbd file in the <Agent_Home> directory.

Important! The default errors.pbd is designed to report serious errors, while minimizing overhead as much as possible. Overuse of error tracing, for example, applying ExceptionErrorReporter to every monitored method can result in a high volume of "false positives." For example, entering California in a numeric field, can cause a NumberFormatException. You would not want to report this exception as a serious problem.