I have an application running on azure app services, the application works properly but from time to time it goes very slow. Using the metrics I can see that when the application goes slow it's because the .Net process it's consuming almost 100% of the CPU time and it keeps doing until I restart the service. I don't know which functionality it's causing this behaviour and I dont have any guess.
What can I do to find out which part of my code is taking almost all the procesor time?
Are there any tool that can tell me which code is executing at a given moment?