Question

Difficulty: EasyImplement Application Insights Profiler, Snapshot Debugger, and Smart Detection

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?

  1. Add the APPLICATIONINSIGHTS_CONNECTION_STRING setting to the App Service application settings.Answer
  2. B
    Scale the App Service plan to the Free tier to support Profiler data collection.
  3. C
    Configure a Key Vault access policy to grant the web application's managed identity GET permissions on the Application Insights resource.
  4. D
    Configure 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

1
Identify that the application cannot send telemetry because it lacks the endpoint information required by the SDK.
Determine that a connection configuration setting must be established.
The Application Insights SDK requires a valid connection string to locate, route, and authenticate telemetry data to the target Azure resource.
2
Add the APPLICATIONINSIGHTS_CONNECTION_STRING app setting within the Azure App Service configuration.
The application runtime detects the environment variable and establishes a connection to the telemetry ingestion endpoint.
App Service settings are exposed as environment variables, which the Application Insights SDK automatically reads at startup.

Key Concept

Application Insights SDK Connection Configuration
Rate this question