You are setting up monitoring for a .NET web application hosted on Azure App Service. You want to implement Application Insights to proactively alert you to potential performance anomalies using Smart Detection, identify execution hot paths using Profiler, and collect debug state for unhandled exceptions using Snapshot Debugger. However, you notice that the Application Insights dashboard is not receiving any telemetry data from the web application. Which configuration requirement must you complete to enable the application to send telemetry to Application Insights?
- Add the APPLICATIONINSIGHTS_CONNECTION_STRING setting to the App Service application settings.Answer
- BScale the App Service plan to the Free tier to support Profiler data collection.
- CConfigure a Key Vault access policy to grant the web application's managed identity GET permissions on the Application Insights resource.
- DConfigure an autoscale-out metric rule based on memory usage to trigger the diagnostic telemetry collection.
Answer
Add the APPLICATIONINSIGHTS_CONNECTION_STRING setting to the App Service application settings.
To send telemetry to Application Insights, the application must be configured with a valid connection string (specifically via the APPLICATIONINSIGHTS_CONNECTION_STRING application setting in Azure App Service). This provides the SDK with the target endpoint and authentication details needed to upload logs, traces, and metrics.
Step-by-Step Solution
Key Concept
Application Insights SDK Connection Configuration