22 Jan 2025 11:39 AM
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 ?
03 Feb 2025 11:40 AM
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);
}
}