This article shows how to use the jKoolCloud AJAX Interceptor to capture AJAX call performance, errors, and abort events, and stream the data to TNT4J-Streams.
Sometimes, especially when an AJAX call fails on the client side, you want to know. In order to have jKoolCloud log such events, one may need to intercept all AJAX calls
Installation
Put ajax-interceptor-tnt4j.js in your script directory.
Then add tnt4j-ajax-interceptor.js to your page.
<script src="js/ajax-interceptor-tnt4j.js"></script>
For manual installation, copy
ajax-interceptor-tnt4j.js to your scripts folder and add it to your page.After installing this interceptor.
How it Works
'tnt4j-ajax-interceptor' intercepts all XMLHttpRequest invocations and calculates every AJAX query invocation's time, as accepts errors or abort conditions. As soon as the data is collected it streams to TNT4J-Stream HTTP input.