ApplicationInsights-JS

Upgrading from v1.x -> v2.x of Application Insights

Breaking changes in the SDK V2 version:

If you are using the current application insights PRODUCTION SDK (1.0.20) and want to see if the new SDK works in runtime, please update URL depending on your current SDK loading scenario:

a) Download via CDN scenario: Update code snippet that you currently use to point to the following URL: "https://js.monitor.azure.com/scripts/b/ai.2.min.js"

b) NPM scenario: Call downloadAndSetup to download full ApplicationInsights script from CDN and initialize it with connection string.

appInsights.downloadAndSetup({
    connectionString: "InstrumentationKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    url: "https://js.monitor.azure.com/scripts/b/ai.2.min.js"
});

Test in internal environment to verify monitoring telemetry is working as expected. If all works, please update your api signatures appropriately to SDK V2 version and deploy in your production environments.