C# Programming
Published in

C# Programming

Azure Application Insights Configuration for Function App running locally

Today, I will show how to configure Azure Application Insights while developing the function locally. And where to configure the same after deploying in Azure.

What we need?

Access to Azure Portal, if you don’t have , don’t worry , you can create a Sanbox with Microsoft Learn to perform the same and VS2019.


  1. Create a Resource Group

a. one is host.json, which is responsible for global configurations for our function apps.

b. another is local.settings.json, it is responsible for storing our local development related settings. i.e. Azure Storage Emulator if we don’t want to use Azure Storage, this file is critical for configuring Application Insights. Please do remember that this file will be ignored when we will do a release in Azure.

7. Configure your logging level in host.json, please follow below snippet,


8. In your local.settings.json, you can configure Application Instrument Key, so that logs and metrics will be sent to Application Insights on Azure. Please find the below code snippet for your reference.

9. Now Run your application and you are done. Now all your application telemetry will be pushed to Azure, you can see your telemetry data as below,

10. When deploying the app in Azure, you can set the App Insight Key by making changes in Application Settings, as below

If any clarifications are required , please feel free to get in touch with me and always refer Microsoft Learn Documentation.

In Application Insights Log tables you can find according to below categories,

Microsoft documentation link https://docs.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2#configure-categories



Focuses on ASP.Net | ASP.Net Core | .Net & C# advance design, best practices & experiences to make developers life simple..!!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arkaprava Sinha

Software Engineer-III @Walmart , Cloud, IoT and DevOps Enthusiast