Application Insights
Application Insights is a feature of Azure Monitor that can provide you insights into your applications performance and help with troubleshooting.
Deploying Application Insights
First off we need to deploy application insights, in this scenario were doing it trough Bicep and IAC and the module can look like this
Application Insights Bicep Module
Expose the Application Insights Instrumentation key as an environment variable for Container Apps
Add the required package to the application code
In my case i added the NuGet packages using the command:
dotnet add package Microsoft.ApplicationInsights.AspNetCore --version 2.22.0
Add the required code to your dotnet application
And thats it!
You should not be able to view Application Map like this:
Live Metrics:
And much more like applicaton exceptions etc. Thanks for reading and good luck!