You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fdb20cb
Browse filesBrowse the repository at this point in the historyBrowse files
authored
docs: simplify the customer setup walkthrough (#41)
Co-authored-by: Hou Chi Chan <houchichan@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/MONITORING.md
+63-11Lines changed: 63 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,24 @@
1
1
# Monitoring setup and sample queries
2
2
3
-
Use this guide to operate a **single-region Azure Function** or **multiple regional
4
-
Functions**. Azure Front Door is optional; it adds an edge monitoring layer and does
5
-
not replace Function, credential, or provider monitoring.
3
+
Use this guide to find your endpoint's logs and set up alerts. Guided setup creates Application
4
+
Insights and a Log Analytics workspace, but **you still need to configure and test notifications**.
6
5
7
-
These are operator-run examples, not an automatic deployment of monitors. Review
8
-
permissions, privacy, charges, and alert routing before creating anything. All
9
-
thresholds and intervals below are **starting points, not SLAs**. This guide does not
10
-
change deployed diagnostics, sampling, retention, or alert settings.
6
+
For your first single-region deployment:
11
7
12
-
For the first deployment, finish the [customer acceptance checks](ONBOARDING.md#validate-the-deployed-endpoint)
13
-
with the authorized test operator. Read [Application Insights](APPLICATION-INSIGHTS.md) for
14
-
collection/identity details, then use this guide to establish queries and alerts. You do not
15
-
need Front Door, a Workbook, or a new exporter merely to locate your existing single-region logs.
8
+
1.[Find the monitoring resources and confirm data is arriving](#1-record-the-deployment-and-confirm-telemetry)
9
+
after an [authorized test](ONBOARDING.md#validate-the-deployed-endpoint).
10
+
2. Check [requests, failures, and latency](#2-single-region-function-queries), then use
11
+
[the log format for your runtime](#runtime-specific-log-discovery).
12
+
3.[Set up and test alerts](#5-set-up-notifications-and-alert-rules), including certificate
13
+
reminders and cost ownership.
14
+
15
+
The multi-region queries, shared Workbook, and Front Door sections are optional.
16
+
You do not need them to find single-region logs. For collection and identity details, see
17
+
[Application Insights](APPLICATION-INSIGHTS.md).
18
+
19
+
These examples do not create monitors automatically. Review permissions, privacy, and charges
20
+
before applying them. Thresholds and intervals are **starting points, not SLAs**; tune them to
21
+
your deployment.
16
22
17
23
## 1. Record the deployment and confirm telemetry
18
24
@@ -37,6 +43,23 @@ methods can differ. The current setup template requests 30-day retention; confir
37
43
effective workspace/table retention and organizational policy before changing it.
38
44
It does not create the action groups, Workbooks, or alert rules described here.
39
45
46
+
### Find the linked resources in the portal
47
+
48
+
1. Open the Function App named in your deployment summary.
49
+
2. Select **Monitoring > Application Insights**. Follow the linked resource name; do not
50
+
select **Change your resource** or **Apply** just to view your logs.
51
+
52
+

53
+
54
+
3. On that Application Insights resource's **Overview**, find **Logs workspace** and open
55
+
the linked workspace. Then select **Logs** in the workspace to use the queries below.
56
+
57
+

58
+
59
+
These are real portal views of an existing test deployment, with identifying information and
60
+
connection details permanently hidden. Resource names, regions, and portal layouts may differ.
61
+
The links show where to navigate; they do not prove that test traffic or delivery succeeded.
62
+
40
63
In the Azure portal, inspect each Function's Application Insights association,
41
64
monitoring settings, managed-identity ingestion authorization, and diagnostic
42
65
destinations. Do not expose connection strings or credential values. Application
@@ -69,6 +92,35 @@ necessary resource/workspace access; saving a Workbook does not grant its reader
69
92
access to its data. Cross-workspace alert evaluation also needs access to each
70
93
workspace under the rule's configured identity.
71
94
95
+
### Run a first query and read the results
96
+
97
+
1. In your workspace's **Logs**, close any welcome or Queries hub dialog. If the portal opens
98
+
in **Agent** mode, switch it off for this walkthrough, then choose **KQL mode**.
99
+
2. Paste the query below. Replace `<function-role-name>` with the `AppRoleName` you verified
100
+
using the discovery query above. If a workspace contains multiple Application Insights
101
+
components with that same role name, also filter by your component's `_ResourceId`.
102
+
3. Select **Run**, then read the **Results** grid. Adjust `ago(48h)` to include the time of
103
+
your authorized test; this query sets its own time range.
104
+
105
+
```kusto
106
+
AppRequests
107
+
| where TimeGenerated >= ago(48h)
108
+
| where AppRoleName == "<function-role-name>" and Name == "SendOtp"
109
+
| summarize StoredRows = count() by ResultCode, Success
110
+
| order by ResultCode asc
111
+
```
112
+
113
+

114
+
115
+
*This real query returned 11 stored rows with result code 200 and `Success=true` in the example
116
+
window. The role and workspace names are hidden. The query shows counts only: no phone numbers,
117
+
message bodies, credentials, or raw trace messages. Your result counts will differ.*
118
+
119
+
`StoredRows` counts stored telemetry records, not delivered messages or necessarily all requests.
120
+
Sampling can change the count, and evaluation and live calls can both return HTTP 200. No rows
121
+
means no matching records in the selected scope/time range; it is not proof that nothing failed.
122
+
Use the scoped and sampling-aware queries below for ongoing monitoring.
0 commit comments