This project is a sample .NET 6 function app which defines an Http trigger function that integrates Application Insights to log telemetry on function executions with the Azure Monitoring service.
The project was setup following the below documentation.
- Monitor executions in Azure Functions
- Develop C# class library functions using Azure Functions - Log Custom Telemetry
- Azure Functions HTTP Trigger
NOTE: Project setup using VS 2022 installed with Azure specific workloads - see documentation below: Configure Visual Studio for Azure development with .NET Overview: Azure integration
Dependencies:
NOTE: The version in this project for both dependencies (Microsoft.Azure.WebJobs/Microsoft.Azure.WebJobs.Logging.ApplicationInsights) is 3.0.33 but the version for 'Microsoft.Azure.WebJobs.Logging.ApplicationInsights' should match the version of the 'Microsoft.Azure.WebJobs' package in a new solution.
Also, this project can be run locally and successfully demonstrate data ingestion into Application Insights by adding the app setting 'APPINSIGHTS_INSTRUMENTATIONKEY' with a valid instrumentation key value into the project local.settings.json file.