Hello
I'm trying to use the JS RUM agent to measure and track ajax requests whilst a user is on a page (after page is loaded)
Following instructions from this post I have the following
window.addEventListener('load', function(e) {
var pageTransaction = apm.startTransaction(pageName, 'on-page', { managed: true })
var pageTask = pageTransaction.addTask('on-page-task');
});
window.addEventListener("beforeunload", function() {
pageTransaction.removeTask(pageTask )
pageTransaction.end()
});
All ajax request after page load are getting logged correctly into the new transaction, and distributed tracing is working, however when I do pageTransaction.end() I am getting logs along the lines of
Transaction was discarded! Browser was not responsive enough during the transaction. duration: 46331.14500006195 browserResponsivenessCounter: 85 interval: 500
What does this mean, and do I have any influence on the 'browserResponsiveness'?
It doesn't seem to make any difference if I do this manually from the console, or in the beforeunload event...