| name | description |
|---|---|
application-insights |
Add instrumentation to an application to send useful telemetry data to Azure App Insights |
This skill enables sending telemetry data of an application to Azure App Insights for better observability of the app's health.
Use this skill when the user wants to enable telemetry for their application.
The app in the workspace must be one of these kinds
- An ASP.NET Core app
- A .NET Core Worker Service app
- An Angular app
Find out the (programming language, application framework, hosting) tuple of the application the user is trying to add telemetry support in. This determines how the application can be instrumented. Read the source code to make an educated guess. Confirm with the user on anything you don't know.
Add instrumentation to the app by creating the AppInsights resource and update the app's code.
Use one of the following options that fits the environment.
- Use Azure Portal. See this guide for steps to create an App Insights resource via Azure Portal.
- Use Azure CLI. See scripts/appinsights.ps1 for what Azure CLI command to execute to create the App Insights resource.
- If the app is an ASP.NET Core app, see ASPNETCORE guide for how to modify the C# code.
- If the app is a .NET Core app using a worker service, see NETCORE guide for how to modify the C# code.
- If the app is an Angular app, see ANGULAR guide for how to modify the TypeScript code.
- Connectionstring is loaded from the appsettings ApplicationInsights section.