Skip to content

Commit 9d4ab31

Browse files
committed
Adding some more Kusto queries thanks to the amazing Peter Lu.
1 parent 1cb5c56 commit 9d4ab31

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

articles/cognitive-services/diagnostic-logging.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Follow these instructions to explore log analytics data for your resource.
6363

6464
### Sample queries
6565

66+
Here are a few basic Kusto queries you can use to explore your log data.
67+
6668
Run this query for all diagnostic logs from Azure Cognitive Services for a specified time period:
6769

6870
```kusto
@@ -85,6 +87,24 @@ AzureDiagnostics
8587
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES" |
8688
summarize count() by Resource
8789
```
90+
Run this query to find the average time it takes to perform an operation:
91+
92+
```kusto
93+
AzureDiagnostics
94+
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
95+
| summarize avg(DurationMs)
96+
by OperationName
97+
```
98+
99+
Run this query to view the volume of operations over time split by OperationName with counts binned for every 10s.
100+
101+
```kusto
102+
AzureDiagnostics
103+
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
104+
| summarize count()
105+
by bin(TimeGenerated, 10s), OperationName
106+
| render areachart kind=unstacked
107+
```
88108

89109
## Next steps
90110

0 commit comments

Comments
 (0)