0
votes

I'd like to set up App Insights on a .NET Core API project I have.

I've been following a couple articles, this simple one with setup steps here: https://docs.microsoft.com/en-us/azure/azure-monitor/learn/dotnetcore-quick-start

And the more in-depth: https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core

I have everything set up and registered correctly

enter image description here

But I can't get any data to show up, either in Azure or in Visual Studio's App Insights Search

The steps to setup seem pretty straightforward and I haven't missed any steps - any good reasons why no data is showing up?

1
when you run your project locally in visual studio, in the visual studio output window, can you see messages like "application insights Telemetry (your instrumentation key) xxxx"Ivan Yang
@IvanYang - yes I do, in the format Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights.Dev.mykey.Request","time":"2019-08-06T03:20:49.1323076Z", ...}Steven
For a testing purpose, no need to change the log level. But if you want to get more infor, you should change Warning to Information. And can you please post a screenshot of your application insights search?Ivan Yang
And Note: there is always some minutes delay for the data sent to azure portal. I test it at my side, everything is ok.Ivan Yang
and do you only have one application insights? I saw the scenario that some users misused application insights. please make sure you're using the correct one in your site, and also check the correct one on azure portal :)Ivan Yang

1 Answers

1
votes

As per your description, there seems no configuration error in your site since you can see the telemetry data is sent via visual studio output.

There are some things you need to check:

In application insights search:

1.please make sure the time range is selected as a proper value, like last hour or last 30 minutes.

2.For the types, select All.

enter image description here

And also note that, there is always some minutes delay for the data to be displayed on azure portal.

If you want to get more infor, then in appsettings.json, you should change Warning to Information