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
-
What is the framework and version of your WebApp? – Harshitha Jul 23 '23 at 17:36
-
Please share your code once. – Harshitha Jul 23 '23 at 17:38
-
1@Harshitha, it is codeless way of doing app insights. I have not installed the sdk in visual studio. Edited the question with framework.. APi is using .net 4.8. UI is using Node js. I do not know how to get version number. – user575219 Jul 24 '23 at 03:34
-
Ok..Will Look into it and let you know. – Harshitha Jul 24 '23 at 03:39
-
@Harshitha. Thank you. I just want to trace the DB calls and API calls to figure out why the website is so slow. I read that Profiler is the way to go for this. – user575219 Jul 24 '23 at 03:40
-
Can you please share the screenshot of your `Configuration` => `General Settings` section of the Azure App. – Harshitha Jul 24 '23 at 03:44
-
1@Harshitha: Updated question with both General settings of APi web App and Client web App. I can reproduce the issue in production web site. I just browse the website and login. The Login is successful but the consecutive calls after login are taking a minute. – user575219 Jul 24 '23 at 03:52
-
Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/254636/discussion-between-harshitha-and-user575219). – Harshitha Jul 24 '23 at 04:52
-
@Harshitha: Are you available for a chat? Can we set a time please. – user575219 Jul 24 '23 at 14:04
1 Answers
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.
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.
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.

- 3,784
- 2
- 4
- 9