Microsoft Azure Developer Associate AZ-204 Practice Question

An ASP.NET Core web API is hosted on Azure App Service. You enabled Application Insights from the portal so the service is auto-instrumented without code changes. The operations team asks you to record a custom event named "OrderShipped" each time an order is finalized. You must minimize deployment pipeline changes while ensuring the event is captured. Which approach should you use?

  • Configure the App Service diagnostic logs to forward to a Log Analytics workspace instead of Application Insights.

  • Rely only on the existing auto-instrumentation and expect the custom event to appear automatically.

  • Add the Microsoft.ApplicationInsights.AspNetCore SDK to the project and call TelemetryClient.TrackEvent("OrderShipped") inside the order-completion logic.

  • Redeploy the code as an Azure Functions app with the APPINSIGHTS_INSTRUMENTATIONKEY setting configured.

Microsoft Azure Developer Associate AZ-204
Monitor and troubleshoot Azure solutions
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot