<p>I have .Net Core 3.1 web api which is deployed to AKS. I have created Azure App Insights instance to write the logs.
I followed
<a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcore6" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcore6</a>
to configure the .Net application.</p>
<p>Added Microsoft.ApplicationInsights Nuget package</p>
<p>Added connection string in appsettings</p>
<p>Added services.AddApplicationInsightsTelemetry(); in startup.cs</p>
<p>Running api from local pc I can see telemetry being logged in Visual Studio output.</p>
<p>But when I deployed to Azure nothing is flowing into App Insights. Absolutely nothing.</p>
<p>I am new to this and checked pod logs but dint find anything in it. The connection string is correct.</p>
<p>From my local pc I tried to write to Actual App Insights. But although I can see telemetry in Visual Studio nothing is going to Azure.
I am assuming because &quot;Accept data ingestion from public networks not connected through a Private Link Scope&quot; is false for the App Insight instance.So this is also not helping me to debug.I cannot change this setting.</p>
<p>The Azure account is linked to On Premise network.</p>
<p>Can someone point to me what could be the issue</p>

rakesh raman
<p>Microsoft.ApplicationInsights.AspNetCore was not working when using Connection String. When I changed to InstrumentKey the logs started flowing. Weird as MSFT recommendation is to use connection string</p>
