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 fc64354
Browse filesBrowse the repository at this point in the historyBrowse files
Hou Chi Chan
committed
Separate observability documentation from the Front Door infrastructure PR
Remove the Application Insights and monitoring documentation addition from this PR so it can be reviewed independently, with single-region and multi-region Azure Functions coverage.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b5102217-1e24-4fd7-abc5-13fecb0dabaf
Evaluation intentionally emits no provider events. A provider HTTP 200 is not necessarily a
476
-
successful outcome; inspect the normalized outcome and reason.
477
-
478
-
If expected events are absent, check the Function's instrumentation settings, identity role,
479
-
Information-level log filters, sampling, workspace scope/time range and ingestion delay.
480
-
Front Door access/probe diagnostics are **not configured by this script**: enable the required
481
-
categories under the Front Door profile's **Diagnostic settings**, targeting a Log Analytics
482
-
workspace, when edge-level diagnostics are needed. Easy Auth and ingress rejections can happen
483
-
before the handler; investigate platform/authentication and Front Door diagnostics rather than
484
-
expecting a `request_failed` service event. Review diagnostic fields, access and retention before
485
-
enabling collection; never add OTP bodies, plaintext delivery data, keys or tokens to application logs.
486
-
487
-
### Monitoring setup for operators
488
-
489
-
The following is a starting configuration, **not an SLA or a production threshold recommendation**.
490
-
Tune it against normal traffic, ingestion delay, sampling and the on-call team's response policy.
491
-
Creating diagnostics, alerts, availability tests and notification actions can incur charges.
492
-
493
-
1. In **Azure Monitor > Action groups**, create a group for the service owners and test its
494
-
notification delivery. Give operators appropriate read/query access to the regional workspaces;
495
-
alert creators also need permission on the monitored resources.
496
-
2. In each regional Application Insights component, open **Logs** and run the delivery and readiness
497
-
queries above. Save them to a shared **Workbook**; use an explicit cross-workspace union for both
498
-
regions. Include failures by stage, latency, provider outcomes and last telemetry seen per origin.
499
-
3. On the **Front Door profile > Diagnostic settings**, enable `FrontDoorAccessLog` and
500
-
`FrontDoorHealthProbeLog` to a chosen workspace. The script does not create this setting.
501
-
Front Door metrics are available separately without exporting `AllMetrics` to logs.
502
-
Review workspace retention and access: platform access logs may contain client IPs and URLs
503
-
even though the application service events exclude delivery bodies and credentials.
504
-
4. In **Front Door > Alerts > Create alert rule**, select the metrics below, use the suggested
505
-
dimensions to separate origins/endpoints, and attach the action group. Configure auto-resolution
506
-
and a maintenance suppression policy appropriate for the service.
507
-
5. In **Log Analytics workspace > Alerts > Create alert rule**, select **Custom log search** and
508
-
paste one of the alert queries below. Evaluate every 5 minutes. Each query includes its own
509
-
lookback and returns only candidate alert rows: measure **Table rows > 0**. Split by `AppRoleName`
510
-
for per-origin signals. Ensure the rule's query time range covers the stated lookback.
511
-
Test the notification path and recovery in nonproduction before enabling paging.
512
-
513
-
| Signal | Example condition | Scope / caveat |
514
-
|---|---|---|
515
-
|`OriginHealthPercentage`| Average below 100% over 5 minutes | Split by `Origin` and `OriginGroup`. Expect transitional noise; use this with readiness events and absence detection. |
516
-
|`Percentage5XX`| Average above 1% over 5 minutes | Split by `Endpoint`; inspect request volume because small denominators exaggerate percentages. |
517
-
|`OriginLatency`| Average above 1000 ms over 5 minutes | Split by `Origin` and `Endpoint`; replace with a workload-derived latency budget. |
518
-
|`Percentage4XX`| Investigate a sustained rise above baseline | Includes deliberate negative tests and client/authentication failures; do not page on every 401/403. |
519
-
| Application failures / readiness | Custom log queries below | Trace sampling means these are observed failures, not complete request counts. |
520
-
521
-
An Application Insights **Availability > Standard test** can send HTTPS GET to the public
522
-
`/api/health/ready` route and expect 200, using multiple locations. For example, alert on failures
523
-
from two locations over five minutes. Do not put an EPP bearer token in the test, and do not probe
524
-
the protected SendOtp route anonymously as an availability test. A shared health URL proves neither
525
-
every origin's health nor provider delivery; retain the per-origin metric alerts.
526
-
527
-
**Observed live-delivery server failures: example log alert**
528
-
529
-
```kusto
530
-
AppTraces
531
-
| where TimeGenerated > ago(15m)
532
-
| extend e = parse_json(Message)
533
-
| where e.logType == "service" and e.functionName == "SendOtp"
534
-
| where e.eventName == "request_completed" and tobool(e.evaluation) == false
535
-
| summarize ObservedRequests=count(),
536
-
ObservedServerFailures=countif(toint(e.httpStatus) >= 500) by AppRoleName
0 commit comments