Microsoft Azure AI Engineer Associate AI-102 Practice Question

You deploy a Python web API that queries an Azure OpenAI gpt-35-turbo deployment. You must capture the following for every completion request so that your operations team can investigate latency spikes and analyze prompt quality in Application Insights:

  • total processing time on the Azure OpenAI side
  • number of prompt and completion tokens used
  • full prompt text and model response (truncated to 8 kB)

You plan to use OpenTelemetry-based distributed tracing, which is already configured to export spans to the same Application Insights instance that the rest of the web API uses.
Which single action should you perform in the Python project to ensure the required data is captured for each call to Azure OpenAI?

  • Add correlation ID headers manually to every request and write a custom middleware that records timings and headers.

  • Enable diagnostic logging on the Azure OpenAI resource and configure a Log Analytics workspace.

  • Add the azure-core-tracing-opentelemetry package and import its automatic patching helper at application startup.

  • Install the opencensus-ext-azure package and configure the Azure exporter.

Microsoft Azure AI Engineer Associate AI-102
Implement generative AI 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