Search code examples
azure.net-coreazure-application-insights

Proxy - Application Insights


I am using application insights on an on-prem server in our corporation. I have set up the key and everything works when I run it on my machine. However, once I put it on the production server, it does not work.

I have run PerfView to see what the issue might be. Of course, it is not making a successful http call to Azure. So I need to figure out how to set up a proxy for the Application Insights part of my application. Every tutorial that I have found only talk about how to do it for .Net Framework and not .Net Core.

Does anyone have some sample code on how to accomplish this?


Solution

  • In case anyone sees this, AppInsights does support proxies. The AppInsights configuration options include both httpProxyUrl and httpsProxyUrl. Furthermore, the default value for those parameters are pulled from HTTP_PROXY and HTTPS_PROXY environment variable respectively.