'How to configure Application Insights to self host the SDK js file?
We have recently started getting a large number of "SDK LOAD Failure: Failed to load Application Insights SDK script" errors in our Application Insights telemetry for our ASP.NET Core application hosted in Azure. We've done some troubleshooting as outlined by Microsoft and to move forward we are trying to follow the advice in that link to host the SDK file ourselves rather than loading it from the default CDN. However, I can't figure out exactly how to accomplish that.
I have tried updating the configuration in the appsettings.json like this:
"ApplicationInsights": {
"src": "https://ourdomainhere/scripts/ai.2.min.js",
"InstrumentationKey": "xxxxxxxxxxxxxxxxxxxxxx"
}
but this doesn't work. Restarting everything and loading a page still pulls that ai.2.min.js from the default CDN of https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js.
My google-fu is failing me and I'm not seeing any examples on how to do this.
Does anybody have any tips?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
