forked from microsoft/adfsWebCustomization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInteractiveCompletionQuery.txt
45 lines (36 loc) · 2.4 KB
/
InteractiveCompletionQuery.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
Client Interactive Completion Percentage (Total for 1 week):
For all requests that come to ADFS, what percentage of those requests end up returning or erroring out? (i.e. (#succeeded + #failed) / (#started))
Important filters:
• We remove all traffic from known web crawlers, as marked by the App Insights library (using Synthetic Source)
• We remove all traffic for which there is no correlation ID set
• We remove all traffic that appears abnormal, meaning traffic for which there is a high page refresh or page navigation rate
Important Caveats:
• Because we cannot guarantee what the end state of the request is, the numbers here are based on the likely outcome of the request
customEvents
| where timestamp > ago(8d) and timestamp < ago(1d)
| where isempty(operation_SyntheticSource)
| where tostring(customDimensions.CorrelationID) != "NOTSET"
| summarize
EventCount = count(),
DistinctEventCount = dcount(name),
EventNames = makelist(name)
by CorrelationID = tostring(customDimensions.CorrelationID)
| where (1.0 * DistinctEventCount) / (1.0 * EventCount) >= 0.35
| extend LikelyFormsEnded = iff(EventNames has "FormsPageEnd" and (EventNames !has "AuthSelectionPageStart" and EventNames !has "PhoneFactorWaitingStart"), 1, 0)
| extend LikelyAuthSelectEnded = iff((EventNames has "AuthSelectionPageEnd" or EventNames has "AuthSelectionPicked") and (EventNames !has "PhoneFactorWaitingStart"), 1, 0)
| extend LikelyPFAEnded = iff(EventNames has "PhoneFactorLatency" or EventNames has "PhoneFactorWaitingEnd", 1, 0)
| extend LikelyErrorEnded = iff((EventNames has "ErrorPageStart" or EventNames has "ErrorDetailedPageStart") and
(EventNames !has "FormsPageStart" and
EventNames !has "FormsPageEnd" and
EventNames !has "AuthSelectionPageStart" and
EventNames !has "AuthSelectionPageEnd" and
EventNames !has "PhoneFactorWaitingStart" and
EventNames !has "PhoneFactorWaitingEnd"), 1, 0)
| extend LikelyEnded = iff(LikelyFormsEnded > 0 or LikelyAuthSelectEnded > 0 or LikelyPFAEnded > 0 or LikelyErrorEnded > 0, 1, 0)
| project CorrelationID, LikelyEnded
| summarize
TotalRequests = count(),
EndedRequests = countif(LikelyEnded > 0)
| extend InteractiveCompletion = (1.0 * EndedRequests) / (1.0 * TotalRequests) * 100.0