Question

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

A developer is deploying a Java-based API using Azure Functions. The API occasionally experiences intermittent latency spikes during high-load periods. The developer wants to capture detailed CPU and memory allocation profiles using Application Insights Profiler to identify the hot code paths. Currently, the Function App is hosted on a Consumption plan. Which of the following actions must the developer perform first to enable the Profiler?

  1. Upgrade the Function App hosting plan to a Premium plan or a Dedicated App Service plan.Answer
  2. B
    Add an application setting named APPINSIGHTS_INSTRUMENTATIONKEY to reference the Application Insights resource.
  3. C
    Configure a system-assigned managed identity for the Function App and assign it the Monitoring Contributor role.
  4. D
    Create an App Configuration key-value pair using the @Microsoft.KeyVault syntax to store the connection string.

Answer

Upgrade the Function App hosting plan to a Premium plan or a Dedicated App Service plan.
The correct answer states that the hosting plan must be upgraded to a Premium plan or a Dedicated App Service plan. This is because Application Insights Profiler needs to run on a dedicated worker with continuous compute resources, which is not supported on the default serverless Consumption plan for Azure Functions.

Step-by-Step Solution

1
Analyze the current hosting plan for the Azure Functions application.
The Function App is currently hosted on a serverless Consumption plan.
Application Insights Profiler requires continuous worker resources to perform trace collection, which is unsupported on the serverless Consumption plan.
2
Determine the supported hosting plans for Application Insights Profiler in Azure Functions.
Identify that the Elastic Premium plan or a Dedicated App Service plan is required to enable the Profiler.
These plans provide dedicated compute instances where the Profiler agent can continuously run and record performance traces.
3
Upgrade the hosting plan of the Function App to a Premium or Dedicated plan.
The compute tier is scaled up, enabling the runtime environment to support the background Profiler agent.
Upgrading the plan provides the necessary continuous background processing capability to run the Profiler.

Key Concept

Application Insights Profiler requires a compatible compute hosting plan that supports continuous background execution (such as Premium or Dedicated plans for Azure Functions).
Rate this question