Configure your application to ignore errors

In Dynatrace, errors are categorized into the following types:

  • HTTP errors are detected by the browser and by OneAgent on your servers.
  • Custom errors are triggered directly in your application via the Dynatrace JavaScript API.
  • JavaScript errors are detected JavaScript exceptions thrown by the browser.

Note: HTTP and custom errors are also defined via API.

You can use the Errors settings page to configure an error to be:

  • captured
  • included in the Apdex calculation
  • considered for Davis AI problem detection and analysis

For error configuration, edit the application you want to configure and click Application settings > Errors. Errors

Configure HTTP errors

Dynatrace provides a set of pre-defined HTTP error rules out-of-the-box. While adding your own HTTP error rule, you can either add individual HTTP error codes, such as 404, or whole error code ranges, such as 400-499.

To add an individual HTTP error code from a defined error code range

  1. Select Applications from the navigation menu.
  2. Select the application you want to configure.
  3. Click the Browse [...] menu button and select Edit.
  4. From the Application settings menu, select Errors.
  5. Under HTTP errors, select Add rule.
  6. Ensure that you enable at least one of the following options:
    • Match error code (provide a single error code or a code range)
    • Match errors with unknown status code
    • Filter by URL add an HTTP rule
  7. Optional In addition to capturing, you can select the error to be included in the Apdex calculation and to be considered for Davis AI analysis.
    Note: If you opt for including errors in Davis AI analysis, the errors may be reported as new open problems by Davis.
  8. Select Save changes.
    The first rule in the list is applied to detected errors. You can change the order of rules by using the Move up/down controls.
  9. Optional You can also enable Ignore all HTTP errors for Apdex calculations.

Configure custom errors

Custom errors allow you to detect your own defined errors with Dynatrace. An example of this is an error that is triggered during a form field validation.

In order to set up custom errors, configure how the error must be treated in Dynatrace, and then trigger the error in your application using the JavaScript modules API.

To add a custom error rule

  1. Select Applications from the navigation menu.
  2. Select the application you want to configure.
  3. Click the Browse [...] menu button and select Edit.
  4. From the Application settings menu, select Errors.
  5. Under Custom errors, select Add rule.
  6. Provide the Key and Value strings that will be used to ignore matched errors.
    add a custom error rule
  7. Optional In addition to capturing, you can select the error to be included in the Apdex calculation and to be considered for Davis AI analysis.
    Note: If you opt for including errors in Davis AI analysis, the errors may be reported as new open problems by Davis.
  8. Select Save changes.
    The first rule in the list will be applied to detected errors. You can change the order of rules by using the Move up/down controls.
  9. Optional You can also enable Ignore all Custom errors for Apdex calculations.

After adding or excluding a custom error in Dynatrace, you must trigger the error in your application by using the dtrum.reportCustomError() method of the JavaScript API.

For example, a form field error would require the following JavaScript method parameters:

  • Key: the name of the form field (example: custom_buying_form_number_of_travelers_field)
  • Value: the validation error triggered by the validator (example: availability exceeded - e3434)
  • Hint: the actual user input (example: 1000)

Only the key and value can be used to group and analyze custom errors; the hint is optional information.

See more about the JavaScript API.

Configure JavaScript errors

JavaScript errors are detected automatically by the browser, so you don't have to add them. If you configure them to be captured, they will be automatically included in Apdex calculation and Davis analysis.

To ignore JavaScript errors on an individual level, use the Ignore this JavaScript error button on the respective JavaScript error detail page.
ignore a JavaScript error

To ignore all JavaScript errors

  1. Select Applications from the navigation menu.
  2. Select the application you want to configure.
  3. Click the Browse [...] menu button and select Edit.
  4. From the Application settings menu, select Errors.
  5. Under JavaScript errors, enable Ignore all JavaScript errors for Apdex calculations.