Events
Mar 17, 9 p.m. - Mar 21, 10 a.m.
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This guide provides step-by-step instructions to enable diagnostic logging for an Azure AI service. These logs provide rich, frequent data about the operation of a resource that are used for issue identification and debugging. Before you continue, you must have an Azure account with a subscription to at least one Azure AI service, such as Azure AI Speech.
To enable diagnostic logging, you need to select a location to store your log data. This tutorial uses Azure Storage and Log Analytics.
Note
Start by enabling diagnostic logging using the Azure portal.
Note
To enable this feature using PowerShell or the Azure CLI, use the instructions provided in Collect and consume log data from your Azure resources.
It can take up to two hours before logging data is available to query and analyze, so don't worry if you don't see anything right away.
Azure Storage is a robust object storage solution that is optimized for storing large amounts of unstructured data. In this section, you'll learn to query your storage account for total transactions over a 30-day timeframe and export the data to excel.
Learn more about what you can do with diagnostic data in Azure Storage.
Follow these instructions to explore log analytics data for your resource.
Here are a few basic Kusto queries you can use to explore your log data.
Run this query for all diagnostic logs from Azure AI services for a specified time period:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
Run this query to see the 10 most recent logs:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| take 10
Run this query to group operations by Resource:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES" |
summarize count() by Resource
Run this query to find the average time it takes to perform an operation:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| summarize avg(DurationMs)
by OperationName
Run this query to view the volume of operations over time split by OperationName with counts binned for every 10 seconds.
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| summarize count()
by bin(TimeGenerated, 10s), OperationName
| render areachart kind=unstacked
Events
Mar 17, 9 p.m. - Mar 21, 10 a.m.
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Certification
Microsoft Certified: Azure AI Engineer Associate - Certifications
Design and implement an Azure AI solution using Azure AI services, Azure AI Search, and Azure Open AI.