ApplicationInsights-JS
ApplicationInsights-JS copied to clipboard
[BUG] Azure App Service injects deprecated SDK
Description/Screenshot We have an ASP.NET Framework site hosted on Azure App Services where the Application Insights SDK gets injected using the 'APPINSIGHTS_JAVASCRIPT_ENABLED' configuration option. We recently noticed a JavaScript warning originating from the AI SDK (some kind of conflict with GTM it seems).
Upon investigation, I noticed we're loading from az416426.vo.msecnd.net/scripts/a/ai.0.js which I've gathered from other issues is a deprecated version of the SDK and that ai.2.js should be used instead. Am I correct in assuming that Azure App Services indeed still injects the old version?
Steps to Reproduce
Create an Azure App Service with Application Insights and add APPINSIGHTS_JAVASCRIPT_ENABLED
setting on the configuration. Navigate to the site and see ai.0.js being loaded.
- OS/Browser: Edge, Windows
- SDK Version [e.g. 22]:
- How you initialized the SDK: via
APPINSIGHTS_JAVASCRIPT_ENABLED
setting on Azure App Service
Expected behaviour Expecting the current version of the SDK to be loaded.
Additional context We're hosting this site via a third-party managed Azure instance. So we can't just flip the setting and do it manually though.
@johanbenschop yes this is a know issue. We are currently working on fixing this issue. If this is a blocker, please try to manually instrument the application as shown here . The only caveat with this approach is that, it requires adding a dependency on the Application Insights SDK NuGet packages. This method, also means you have to manage the updates to the latest version of the packages yourself.
@kryalama Any ETA on this? We cannot remove or change the APPINSIGHTS_JAVASCRIPT_ENABLED
setting as it's hosted on a managed Azure instance and they use it for billing purposes. So doing it manually will end up loading the SDK twice.
I believe that the latest NuGet package will (finally) address this issue -- the NuGet publishing is not directly owned by this team.
This Issue will be closed in 30 days. Please remove the "Stale" label or comment to avoid closure with no action.