asp.net-web-apiazure-application-insightsservice-fabric-on-premises

How to setup Application Insights for on-premise Service Fabric?


Is it possible to add application insights for web api that's hosted on the on-premise version of service fabric?

So far I have tried to add the application insights to my project and wondering where to send for monitoring. It was easy when app is also on cloud.

I believe there is no on-premise application insights service, so even if the web api is hosted on-premise over service fabric; one must use cloud version application insights service, is that correct? In that case can anyone let me know how to setup?


Solution

  • There is no "on premise" application insights, but as long as your on premise service has access to send outbound data, you can use application insights on your site. You won't be able to use some features, like webtests, because application insights wont be able to make calls into your site.

    Setup is the same as always, create an application insights resource in azure, and either configure it in visual studio, or manually set the instrumentation key in your applicationinsights.config (or via code) in your app.

    If you need to configure outbound firewall rules or anything to let AI send data, that information is all here: https://learn.microsoft.com/en-us/azure/application-insights/app-insights-ip-addresses