Connecting the ASP.NET Core logger to Azure Application Insights

In Chapter 7, Troubleshooting and Debugging, you added the Application Insights provider to ASP.NET Logger Factory.  The Application Insights provider searches for an instrumentation key in your application's configuration, and if it finds it, it uses it to send log messages (called Trace messages in Application Insights) to your cloud resource.

You can find the instrumentation key of your Application Insights when you navigate to the Application Instance resource in the Azure portal and click on the Properties menu item:

You can add the instrumentation key directly to your ...

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.