user575219
user575219

Reputation: 2440

AI Status: There are no insights for this application. Cannot retrieve Application Insights' attach status

We have a website that is running very slow in production. The API is using .NET 4.8. The website front end calls our APIs which in turn calls another 3rd party API. All the three are on the same resource group. Overall it takes about a minute to load the website. I am trying to leverage App Insights to figure what is the code or call that takes so long. I feel like the app insights is not connected to the API webapp based on the application map. How do I make sure app insights is actually connected to the API webapp? This is how the screenshots for app insights looks currently. The intent is that Application insights should listen to the API app service or both. I don't see any API calls some single page application chunk.js, logos calls. I went into the kudu console and used https:///DiagnosticServices. I do not know if it matters but I am trying to use insights for APi webapp not UI webapp

Api Config settings enter image description here

Client Config settings enter image description here

enter image description here

enter image description here

enter image description here enter image description here This is all I see in the map unlike what google shows enter image description here

Upvotes: 0

Views: 188

Answers (1)

Harshitha
Harshitha

Reputation: 7297

There are no insights for this application

From your screen shots it is clear that you have enabled Application Insights for both the Apps.

Your both Applications must have the Instrumentation Key/Connection String Set in the Configuration Section.

enter image description here

Make sure you have set the same key for both the Web and API App.

I read that Profiler is the way to go for this.

You can find the profiler option in Application Insights => Perfomance section.

enter image description here

enter image description here

it is codeless way of doing app insights.

  • With codeless AppInsights, your API may only collect the default requests/traces. If you want to trace additional API calls and logs better to configure in the code.

  • Configuring codeless AppInsights may work better with the WebApp but as you are working even with WebAPI, it is recommended to log the Application Insights using SDK from Code.

Does production have its own instrumentation key? Development have it own key to keep them both seperate? What is the best practice?

As I mentioned we can use same AI for both the environments. But as per your requirement if you want to differentiate the logs, yes, you can have different AI based on the Environment.

Upvotes: 0

Related Questions