Skip to content

Commit cee5ef1

Browse files
committed
Adding very basic diagnostic logging document for Cognitive Services. Will update over time based on traffic and feedback.
1 parent f65b353 commit cee5ef1

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

articles/azure-monitor/platform/diagnostic-logs-schema.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The schema for resource diagnostic logs varies depending on the resource and log
4949
| Azure Batch |[Azure Batch diagnostic logging](../../batch/batch-diagnostics.md) |
5050
| Azure Database for MySQL | [Azure Database for MySQL diagnostic logs](../../mysql/concepts-server-logs.md#diagnostic-logs) |
5151
| Azure Database for PostgreSQL | [Azure Database for PostgreSQL diagnostic logs](../../postgresql/concepts-server-logs.md#diagnostic-logs) |
52-
| Cognitive Services | Schema not available. |
52+
| Cognitive Services | [Diagnostic Logging for Azure Cognitive Services](../../cognitive-services/diagnostic-logging.md) |
5353
| Content Delivery Network | [Azure Diagnostic Logs for CDN](../../cdn/cdn-azure-diagnostic-logs.md) |
5454
| CosmosDB | [Azure Cosmos DB Logging](../../cosmos-db/logging.md) |
5555
| Data Factory | [Monitor Data Factories using Azure Monitor](../../data-factory/monitor-using-azure-monitor.md) |
@@ -203,4 +203,3 @@ The schema for resource diagnostic logs varies depending on the resource and log
203203
* [Stream resource diagnostic logs to **Event Hubs**](../../azure-monitor/platform/diagnostic-logs-stream-event-hubs.md)
204204
* [Change resource diagnostic settings using the Azure Monitor REST API](https://docs.microsoft.com/rest/api/monitor/diagnosticsettings)
205205
* [Analyze logs from Azure storage with Log Analytics](../../azure-monitor/platform/collect-azure-metrics-logs.md)
206-
Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: Diagnostic Logging
2+
title: Diagnostic Logging for Azure Cognitive Services
33
titleSuffix: Cognitive Services - Azure
44
description: This guide provides step-by-step instructions to enable diagnostic logging for an Azure Cognitive Service. These logs provide rich, frequent data about the operation of a resource that are used for issue identification and debugging.
55
services: cognitive-services
66
author: erhopf
77
manager: cgronlun
88
ms.service: cognitive-services
99
ms.topic: article
10-
ms.date: 10/10/2018
10+
ms.date: 06/14/2019
1111
ms.author: erhopf
1212
---
1313

1414
# Enable diagnostic Logging for Azure Cognitive Services
1515

16-
This guide provides step-by-step instructions to enable diagnostic logging for an Azure Cognitive 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 Cognitive Service, such as [Bing Web Search](), [Computer Vision](), or [LUIS]().
16+
This guide provides step-by-step instructions to enable diagnostic logging for an Azure Cognitive 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 Cognitive Service, such as [Bing Web Search](https://docs.microsoft.com/azure/cognitive-services/bing-web-search/overview), [Speech Services](https://docs.microsoft.com/azure/cognitive-services/speech-service/overview), or [LUIS](https://docs.microsoft.com/azure/cognitive-services/luis/what-is-luis).
1717

1818
## Prerequisites
1919

@@ -23,14 +23,14 @@ To enable diagnostic logging, you'll need somewhere to store your log data. This
2323
* [Log Analytics](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitor-stream-diagnostic-logs-log-analytics) - A flexible log search and analytics tool that allows for analysis of raw logs generated by an Azure resource.
2424

2525
> [!NOTE]
26-
> Additional configuration options are available. To learn more, see [Collect and consume log data from your Azure resources](https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-overview-of-diagnostic-logs).
26+
> Additional configuration options are available. To learn more, see [Collect and consume log data from your Azure resources](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-overview-of-diagnostic-logs).
2727
2828
## Enable diagnostic log collection
2929

3030
Let's start by enabling diagnostic logging using the Azure portal.
3131

3232
> [!NOTE]
33-
> To enable this feature using PowerShell or the Azure CLI, use the instructions provided in [Collect and consume log data from your Azure resources](https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-overview-of-diagnostic-logs#how-to-enable-collection-of-diagnostic-logs).
33+
> To enable this feature using PowerShell or the Azure CLI, use the instructions provided in [Collect and consume log data from your Azure resources](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-overview-of-diagnostic-logs#how-to-enable-collection-of-diagnostic-logs).
3434
3535
1. Navigate to the Azure portal. Then locate and select a Cognitive Services resource. For example, your subscription to Bing Web Search.
3636
2. Next, from the left-hand navigation menu, locate **Monitoring** and select **Diagnostic settings**. This screen contains all previously created diagnostic settings for this resource.
@@ -51,30 +51,46 @@ Azure Storage is a robust object storage solution that is optimized for storing
5151
3. Use the available drop-downs to configure your query. For this example, let's set the time range to **Last 30 days** and the metric to **Transaction**.
5252
4. When the query is complete, you'll see a visualization of transaction over the last 30 days. To export this data, use the **Export to Excel** button located at the top of the page.
5353

54-
Learn more about what you can do with diagnostic data in [Azure Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction).
54+
Learn more about what you can do with diagnostic data in [Azure Storage](https://docs.microsoft.com/azure/storage/blobs/storage-blobs-introduction).
5555

5656
## View logs in Log Analytics
5757

58-
<Some intro>
58+
Follow these instructions to explore log analytics data for your resource.
5959

6060
1. From the Azure Portal, locate and select **Log Analytics** from the left-hand navigation menu.
6161
2. Locate and select the resource you created when enabling diagnostics.
6262
3. Under **General**, locate and select **Logs**. From this page, you can run queries against your logs.
6363

6464
### Sample queries
6565

66-
Now that you've enabled data collection, run this query to see the 10 most recent logs:
66+
Run this query for all diagnostic logs from Azure Cognitivie Services for a specified time period:
6767

68+
```kusto
69+
AzureDiagnostics
70+
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
6871
```
69-
AzureDiagnostics | take 10
70-
```
7172

72-
<-! Work with Greg to add additional queries ->
73+
Run this query to see the 10 most recent logs:
74+
75+
```kusto
76+
AzureDiagnostics
77+
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
78+
| take 10
79+
```
7380

74-
## Set an alert
81+
Run this query to group operations by **Resource**:
7582

76-
<-! Work with Greg to provide context for alerts. ->
83+
```kusto
84+
AzureDiagnostics
85+
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES" |
86+
summarize count() by Resource
87+
```
7788

78-
## Schema
89+
## Next steps
7990

80-
<-! Work with Greg to complete the JSON schema. ->
91+
* To understand how to enable logging, and also the metrics and log categories that are supported by the various Azure services, read both the [Overview of metrics](https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-overview-metrics) in Microsoft Azure and [Overview of Azure Diagnostic Logs](https://docs.microsoft.com/azure/azure-monitor/platform/diagnostic-logs-overview) articles.
92+
* Read these articles to learn about event hubs:
93+
* [What is Azure Event Hubs?](https://docs.microsoft.com/azure/event-hubs/event-hubs-what-is-event-hubs)
94+
* [Get started with Event Hubs](https://docs.microsoft.com/azure/event-hubs/event-hubs-csharp-ephcs-getstarted)
95+
* Read [Download metrics and diagnostic logs from Azure Storage](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-dotnet#download-blobs).
96+
* Read [Understand log searches in Azure Monitor logs](https://docs.microsoft.com/azure/log-analytics/log-analytics-log-search-new).

0 commit comments

Comments
 (0)