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

Dynatrace isn't capturing the javascript errors in my application which are handled by react-router error boundry.

sai35277
Newcomer_

I have a reactjs application where i am using react-router library but that router library has a javascript error boundry error handling in built. So i am unabel to see that JS error in dynatrace. What can i do ?

1 REPLY 1

SjoerdB
Advisor

Using the injected Dynatrace javascript directly, you could add the errors to Dynatrace as well, by adding a few lines to your frontend central errorhandler...

please check more options in the documentation...

something like this (created a centralised error handler with window.error):

window.onerror = (event) => {
console.log("Error occurred: " + event);
//check if Dynatrace agent is available
if (typeof dT_ !== 'undefined') {
dtrum.reportError(event);
}
}

 

 

Dynatrace Certified Professional | Dynatrace partner IctCoreBiz B.V.

Featured Posts