Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detect JavaScript Errors and choose which ones to report to dynatrace

Frequent Guest

We have some errors we want to ignore, however due to situations like this

it is very problematic to ignore them.  Some errors we want to consolidate as a single error.  Some of these errors are when loading 3rd party scripts.  Is there a proposed solution for us to capture global errors, and choose which ones we wnat to report to Dynatrace?  Also, would this be a scenario where we'd want to report it as a normal JS Error or a Custom Error?

It is a React Single page application.  I was thinking of doing a window.onerror function in the index.html but not sure this is the best approach.  Can you please advise? 


DynaMight Legend
DynaMight Legend

you can define JS error rules per application. More information can be found here: 


Frequent Guest

I don't think that has the error rules I'm trying to solve for.  When it comes to dynamic javascript errors, we can't consolidate them so "ignoring" them is pretty much impossible in Dynatrace as you can't apply any sort of regex or other logic to the error rule.  That is why I'm thinking I may need to capture some global errors myself within my source code and report them to Dynatrace differently.

Featured Posts