In addition to internal improvements we have fixed some bugs, cleaned up the SDK, and added a couple more features:
Add snippet.js to NPM package:
Option to disable cookies
Enable dependency correlation headers
These are now turned off by default, but you can enable them manually. To correlate dependencies with server request set disableCorrelationHeaders in your config file to false. If you opt in to this feature you will then be able to see the server request that correlate with your client side AJAX calls.
The JS SDK has fully switched to https. We now use https to send all telemetry and to download the library. Also, for all secure sites the SDK will create cookies with a secure flag - more on set-cookie documentation.
Telemetry is now sent more reliably when:
1. The Application Insights portal is imposing throttling, or is temporarily unable to accept data.
Retry and error handling features are helping to improve transmission reliability. In the case of network issues, the SDK will retry sending the telemetry data with an exponential backoff.
2. The user navigates to a new page within the same site, shortly after your code sends a telemetry event. Previously, events not yet sent were lost when the page was unloaded. Events are now kept in a session buffer that is preserved across pages in the same site.
Performance.now in Session Class
After working with the PowerBI and Edge team we have moved to using performance.now in session calls. This improves the performance of our library’s date/time handling.
Special thanks to Kamil Szostak for help preparing this post.