AI-102 Question 59
Single answerYou are designing an Azure AI solution and need to enable diagnostic logging for an Azure Cognitive Services resource to monitor API usage and troubleshoot errors. Which step must you take to ensure diagnostic logs are properly configured and collected?
- A
Enable diagnostic settings in the Azure portal and configure a destination such as Log Analytics or a Storage Account.
- B
Install and run the Azure Diagnostics Agent on the Cognitive Services resource.
- C
Enable system-assigned managed identity for the Cognitive Services resource to allow diagnostic logging.
- D
Create a custom diagnostic logging script and deploy it to the resource using Azure Functions.
Show answer and explanation
Correct answer: A
Explanation
To configure diagnostic logging for Azure Cognitive Services, you must use Azure's built-in diagnostic settings. This involves enabling diagnostic settings in the Azure portal and specifying a destination to collect the logs, such as Log Analytics or a Storage Account. Other options, such as installing an agent, enabling managed identities, or creating custom scripts, are not required for this purpose.
- A. Correct.
This is correct. To enable diagnostic logging for Azure Cognitive Services, you must configure diagnostic settings in the Azure portal and specify a destination for the logs, such as Log Analytics, a Storage Account, or Event Hub.
- B. Incorrect.
This is incorrect. The Azure Diagnostics Agent is not required for Azure Cognitive Services as diagnostic logging is handled through native Azure diagnostic settings.
- C. Incorrect.
This is incorrect. While enabling a managed identity can help with authentication for other services, it is not required for enabling diagnostic logging.
- D. Incorrect.
This is incorrect. Writing a custom diagnostic logging script is unnecessary because Azure provides built-in diagnostic logging capabilities that can be configured through the portal.