Skip to content

Commit 405966b

Browse files
authored
[Telemetry] Provide starter template and example kusto queries (#1776)
Provide starter template and example kusto queries Related to #1777
1 parent 05319e2 commit 405966b

File tree

3 files changed

+1112
-0
lines changed

3 files changed

+1112
-0
lines changed

RELEASENOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### AL-Go Telemetry
2+
3+
AL-Go now offers a dataexplorer dashboard to get started with AL-Go telemetry. Additionally, we've updated the documentation to include a couple of kusto queries if you would rather build your own reports.
4+
15
### Issues
26

37
- Issue 1770: Wrong type of _projects_ setting in settings schema

Scenarios/EnablingTelemetry.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,72 @@ By setting the Microsoft telemetry connection string to be an empty string you o
2020

2121
Sending extended telemetry to Microsoft is helpful for when we need to help investigate an issue in your repository.
2222

23+
## Getting Started with Dashboard and Queries
24+
25+
### Getting Started with Data Explorer
26+
27+
AL-Go provides a template data explorer report to help you get started. To use this report:
28+
29+
1. Download the telemetrydashboard.json file from [here](resources/telemetrydashboard.json)
30+
1. Open the file in an editor and replace the clusterUri and database:
31+
- **database**: Name of your application insights resource in Azure
32+
- **clusterUri**: Use the following uri but replace YourSubscriptionId, YourResourceGroup and YourApplicationInsightsName
33+
- https://ade.applicationinsights.io/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroup/providers/microsoft.insights/components/YourApplicationInsightsName
34+
1. Go to https://dataexplorer.azure.com/dashboards
35+
1. In the top left corner, click on the arrow next to "New Dashboard" and select "Import dashboard from file".
36+
37+
### Getting Started with writing your own queries
38+
39+
To get started with writing kusto queries for your AL-Go telemetry, you can use the following examples as inspiration.
40+
41+
The following query gets all telemetry emitted when an AL-Go workflow completes.
42+
43+
```
44+
traces
45+
| where timestamp > ago(7d)
46+
| project timestamp,
47+
message,
48+
severityLevel,
49+
RepositoryOwner = tostring(customDimensions.RepositoryOwner),
50+
RepositoryName = tostring(customDimensions.RepositoryName),
51+
RunId = tostring(customDimensions.RunId),
52+
RunNumber = tostring(customDimensions.RunNumber),
53+
RunAttempt = tostring(customDimensions.RunAttempt),
54+
WorkflowName = tostring(customDimensions.WorkflowName),
55+
WorkflowConclusion = tostring(customDimensions.WorkflowConclusion),
56+
WorkflowDurationMinutes = round(todouble(customDimensions.WorkflowDuration) / 60, 2),
57+
ALGoVersion = tostring(customDimensions.ALGoVersion),
58+
RefName = tostring(customDimensions.RefName)
59+
| extend HtmlUrl = strcat("https://github.com/", RepositoryName, "/actions/runs/", RunId)
60+
| where message contains "AL-Go workflow"
61+
```
62+
63+
The following query gets all telemetry emitted when an AL-Go action completes.
64+
65+
```
66+
traces
67+
| where timestamp > ago(7d)
68+
| project timestamp,
69+
message,
70+
severityLevel,
71+
RepositoryOwner = tostring(customDimensions.RepositoryOwner),
72+
RepositoryName = tostring(customDimensions.RepositoryName),
73+
RunId = tostring(customDimensions.RunId),
74+
RunNumber = tostring(customDimensions.RunNumber),
75+
RunAttempt = tostring(customDimensions.RunAttempt),
76+
WorkflowName = tostring(customDimensions.WorkflowName),
77+
WorkflowConclusion = tostring(customDimensions.WorkflowConclusion),
78+
WorkflowDuration = todouble(customDimensions.WorkflowDuration),
79+
ALGoVersion = tostring(customDimensions.ALGoVersion),
80+
RefName = tostring(customDimensions.RefName),
81+
RunnerOs = tostring(customDimensions.RunnerOs),
82+
RunnerEnvironment = tostring(customDimensions.RunnerEnvironment),
83+
ErrorMessage = tostring(customDimensions.ErrorMessage),
84+
ActionDurationSeconds = todouble(customDimensions.ActionDuration)
85+
| extend HtmlUrl = strcat("https://github.com/", RepositoryName, "/actions/runs/", RunId)
86+
| where message contains "AL-Go action"
87+
```
88+
2389
## Telemetry events and data
2490

2591
AL-Go logs four different types of telemetry events: AL-Go action ran/failed and AL-Go workflow ran/failed. Each of those telemetry events provide slightly different telemetry but common dimensions for all of them are:

0 commit comments

Comments
 (0)