Skip to content

Commit 1a13ac4

Browse files
authored
Merge pull request #172535 from baanders/9-15-logs-perf
ADT: Content performance Sept (diagnostics logs)
2 parents 1b64664 + 22229af commit 1a13ac4

File tree

2 files changed

+34
-37
lines changed

2 files changed

+34
-37
lines changed

articles/digital-twins/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
items:
138138
- name: View metrics in Azure Monitor
139139
href: troubleshoot-metrics.md
140-
- name: Enable and query diagnostics logs
140+
- name: Use diagnostics logs
141141
href: troubleshoot-diagnostics.md
142142
- name: Enable alerts
143143
href: troubleshoot-alerts.md

articles/digital-twins/troubleshoot-diagnostics.md

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
---
22
# Mandatory fields.
3-
title: Enable and query diagnostics logs
3+
title: Use diagnostics logs
44
titleSuffix: Azure Digital Twins
5-
description: See how to enable logging with diagnostics settings and query the logs for immediate viewing.
5+
description: See how to enable logging with diagnostics settings and query the logs for immediate viewing. Also, learn about the log categories and their schemas.
66
author: baanders
77
ms.author: baanders # Microsoft employees only
8-
ms.date: 8/24/2021
8+
ms.date: 9/15/2021
99
ms.topic: how-to
1010
ms.service: digital-twins
11+
ms.custom: contperf-fy22q1
1112
---
1213

1314
# Troubleshooting Azure Digital Twins: Diagnostics logging
1415

15-
Azure Digital Twins can collect logs for your service instance to monitor its performance, access, and other data. You can use these logs to get an idea of what is happening in your Azure Digital Twins instance, and analyze root causes on issues without needing to contact Azure support.
16+
Azure Digital Twins can collect **logs** for your service instance to monitor its performance, access, and other data. You can use these logs to get an idea of what is happening in your Azure Digital Twins instance, and analyze root causes on issues without needing to contact Azure support.
1617

17-
This article shows you how to [configure diagnostic settings](#turn-on-diagnostic-settings) in the [Azure portal](https://portal.azure.com) to start collecting logs from your Azure Digital Twins instance. You can also specify where the logs should be stored (such as Log Analytics or a storage account of your choice).
18+
This article shows you how to configure diagnostic settings in the [Azure portal](https://portal.azure.com), including what types of logs to collect and where to store them (such as Log Analytics or a storage account of your choice). Then, you can query the logs to quickly gather custom insights.
1819

19-
This article also contains lists of all [log categories](#log-categories) and [log schemas](#log-schemas) that Azure Digital Twins collects.
20-
21-
After setting up logs, you can also [query the logs](#view-and-query-logs) to quickly gather custom insights.
20+
This article also contains information about all the **log categories** that Azure Digital Twins can collect, and their **schemas**.
2221

2322
## Turn on diagnostic settings
2423

@@ -55,6 +54,32 @@ New settings take effect in about 10 minutes. After that, logs appear in the con
5554

5655
For more detailed information on diagnostic settings and their setup options, you can visit [Create diagnostic settings to send platform logs and metrics to different destinations](../azure-monitor/essentials/diagnostic-settings.md).
5756

57+
## View and query logs
58+
59+
After configuring storage details of your Azure Digital Twins logs, you can write **custom queries** for them to generate insights and troubleshoot issues. The service also provides a few example queries that can help you get started, by addressing common questions that customers may have about their instances.
60+
61+
Here's how to query the logs for your instance.
62+
63+
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your Azure Digital Twins instance. You can find it by typing its name into the portal search bar.
64+
65+
2. Select **Logs** from the menu to open the log query page. The page opens to a window called *Queries*.
66+
67+
:::image type="content" source="media/troubleshoot-diagnostics/logs.png" alt-text="Screenshot showing the Logs page for an Azure Digital Twins instance in the Azure portal with the Queries window overlaid, showing prebuilt queries." lightbox="media/troubleshoot-diagnostics/logs.png":::
68+
69+
These queries are prebuilt examples written for various logs. You can select one of the queries to load it into the query editor and run it to see these logs for your instance.
70+
71+
You can also close the *Queries* window without running anything to go straight to the query editor page, where you can write or edit custom query code.
72+
73+
3. After exiting the *Queries* window, you'll see the main query editor page. Here you can view and edit the text of the example queries, or write your own queries from scratch.
74+
:::image type="content" source="media/troubleshoot-diagnostics/logs-query.png" alt-text="Screenshot showing the Logs page for an Azure Digital Twins instance in the Azure portal. It includes a list of logs, query code, and Queries History." lightbox="media/troubleshoot-diagnostics/logs-query.png":::
75+
76+
In the left pane,
77+
- The *Tables* tab shows the different Azure Digital Twins [log categories](#log-categories) that are available to use in your queries.
78+
- The *Queries* tab contains the example queries that you can load into the editor.
79+
- The *Filter* tab lets you customize a filtered view of the data that the query returns.
80+
81+
For more detailed information on log queries and how to write them, you can visit [Overview of log queries in Azure Monitor](../azure-monitor/logs/log-query-overview.md).
82+
5883
## Log categories
5984

6085
Here are more details about the categories of logs that Azure Digital Twins collects.
@@ -335,34 +360,6 @@ Here's an example JSON body for an `ADTEventRoutesOperation` that of `Microsoft.
335360
},
336361
```
337362

338-
## View and query logs
339-
340-
Earlier in this article, you configured the types of logs to store and specified their storage location.
341-
342-
To troubleshoot issue and generate insights from these logs, you can generate **custom queries**. To get started, you can also take advantage of a few example queries provided for you by the service, which address common questions that customers may have about their instance.
343-
344-
Here's how to query the logs for your instance.
345-
346-
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your Azure Digital Twins instance. You can find it by typing its name into the portal search bar.
347-
348-
2. Select **Logs** from the menu to open the log query page. The page opens to a window called *Queries*.
349-
350-
:::image type="content" source="media/troubleshoot-diagnostics/logs.png" alt-text="Screenshot showing the Logs page for an Azure Digital Twins instance in the Azure portal with the Queries window overlaid, showing prebuilt queries." lightbox="media/troubleshoot-diagnostics/logs.png":::
351-
352-
These queries are prebuilt examples written for various logs. You can select one of the queries to load it into the query editor and run it to see these logs for your instance.
353-
354-
You can also close the *Queries* window without running anything to go straight to the query editor page, where you can write or edit custom query code.
355-
356-
3. After exiting the *Queries* window, you'll see the main query editor page. Here you can view and edit the text of the example queries, or write your own queries from scratch.
357-
:::image type="content" source="media/troubleshoot-diagnostics/logs-query.png" alt-text="Screenshot showing the Logs page for an Azure Digital Twins instance in the Azure portal. It includes a list of logs, query code, and Queries History." lightbox="media/troubleshoot-diagnostics/logs-query.png":::
358-
359-
In the left pane,
360-
- The *Tables* tab shows the different Azure Digital Twins [log categories](#log-categories) that are available to use in your queries.
361-
- The *Queries* tab contains the example queries that you can load into the editor.
362-
- The *Filter* tab lets you customize a filtered view of the data that the query returns.
363-
364-
For more detailed information on log queries and how to write them, you can visit [Overview of log queries in Azure Monitor](../azure-monitor/logs/log-query-overview.md).
365-
366363
## Next steps
367364

368365
* For more information about configuring diagnostics, see [Collect and consume log data from your Azure resources](../azure-monitor/essentials/platform-logs-overview.md).

0 commit comments

Comments
 (0)