Use Application Insights to Monitor Flows
Administrators can view and monitor the integration details of Anthology Student and Anthology Reach integration flows using Azure Application Insights. Some of the details of the Anthology Student integration flows that can be monitored using the Azure Application Insights include:
-
Details of the flow and its run details
-
Flow execution statuses
-
Flow execution times for Integration related activities
View the Application Insights for Student Integration Flows
-
Login to https://portal.azure.com.
-
Navigate to the required environment and click Monitoring > Logs.
-
On the right side, in the Query editor, add the query snippet for the flow.
Use the following query snippets for each type of flow:
Note: In versions prior to Anthology Reach 4.2, prefix the property name with 'prop__' in the following queries. For example, if the property name is CorrelationId use prop_CorrelationId.
Query Snippet for the Anthology Student to Anthology Reach (CNS-CNE) FlowsCopylet IntegrationStatusMap = dynamic(
{
"175490000": "Success",
"175490001": "Failed",
"175490002": "Pending",
"175490003": "Success (with warning)"
});
union traces
| where message startswith "Integration Log added for"
| extend
CorrelationId = tostring(customDimensions['CorrelationId']),
EntityName = tostring(customDimensions['EntityName']),
EntityId = tostring(customDimensions['EntityId']),
IntegrationStatus = IntegrationStatusMap[tostring(customDimensions['IntegrationStatus'])],
OperationType = tostring(customDimensions['OperationType']),
IntegrationCategory = tostring(customDimensions['IntegrationCategory']),
IntegrationSubCategory = tostring(customDimensions['IntegrationSubCategory']),
StartDateTime = todatetime(customDimensions['StartDateTime']),
EndDateTime = todatetime(customDimensions['EndDateTime'])
| project
CorrelationId,
EntityName,
EntityId,
IntegrationStatus,
IntegrationCategory,
IntegrationSubCategory,
OperationType,
StartDateTime,
EndDateTime,
timeTaken = datetime_diff('millisecond', EndDateTime, StartDateTime)
| where IntegrationCategory == 'Reach-Student Integration'
| summarize
RunCount = count(),
SuccessCount = countif(IntegrationStatus == 'Success'),
FailedCount = countif(IntegrationStatus == 'Failed'),
WarningCount = countif(IntegrationStatus == 'Success (with warning)'),
PendingCount = countif(IntegrationStatus == ''),
SuccessRate = (countif(IntegrationStatus in('Success', 'Success (with warning)')) * 100) / count(),
AvgRunTime = avg(timeTaken)
by EntityNameQuery Snippet for the Anthology Reach to Anthology Student (CNE-CNS) FlowsCopylet IntegrationStatusMap = dynamic(
{
"175490000": "Success",
"175490001": "Failed",
"175490002": "Pending",
"175490003": "Success (with warning)"
});
union traces
| where message startswith "FLOWEND - Executed Flow with FlowKeyName "
| extend
CorrelationId = tostring(customDimensions['CorrelationId']),
FlowKey = tostring(customDimensions['FlowKey']),
startTime = todatetime(customDimensions['startTime']),
endTime = todatetime(customDimensions['endTime']),
status = tostring(customDimensions['status'])
| project
CorrelationId,
FlowKey,
startTime,
endTime,
status,
datetime_diff('millisecond', endTime, startTime)
| join kind = leftouter (
union traces
| where message startswith "Integration Log added for"
| extend
CorrelationId = tostring(customDimensions['CorrelationId']),
EntityName = tostring(customDimensions['EntityName']),
EntityId = tostring(customDimensions['EntityId']),
IntegrationStatus = IntegrationStatusMap[tostring(customDimensions['IntegrationStatus'])],
OperationType = tostring(customDimensions['OperationType']),
IntegrationCategory = tostring(customDimensions['IntegrationCategory']),
IntegrationSubCategory = tostring(customDimensions['IntegrationSubCategory']),
StartDateTime = todatetime(customDimensions['StartDateTime']),
EndDateTime = todatetime(customDimensions['EndDateTime'])
| project
CorrelationId,
EntityName,
EntityId,
IntegrationStatus,
IntegrationCategory,
IntegrationSubCategory,
OperationType,
StartDateTime,
EndDateTime,
timeTaken = datetime_diff('millisecond', EndDateTime, StartDateTime)
)
on CorrelationId
| summarize
RunCount = count(),
SuccessCount = countif(IntegrationStatus == 'Success'),
FailedCount = countif(IntegrationStatus == 'Failed'),
WarningCount = countif(IntegrationStatus == 'Success (with warning)'),
PendingCount = countif(IntegrationStatus == ''),
SuccessRate = (countif(IntegrationStatus in('Success','Success (with warning)')) /count())*100,
AvgRunTime = avg(timeTaken)
by FlowKeyQuery Snippet for the Pull Based Student Integration FlowsCopylet IntegrationStatusMap = dynamic(
{
"175490000": "Success",
"175490001": "Failed",
"175490002": "Pending",
"175490003": "Success (with warning)"
});
union traces
| where message startswith "Integration Log added for"
| extend
CorrelationId = tostring(customDimensions['CorrelationId']),
EntityName = tostring(customDimensions['EntityName']),
EntityId = tostring(customDimensions['EntityId']),
IntegrationStatus = IntegrationStatusMap[tostring(customDimensions['IntegrationStatus'])],
OperationType = tostring(customDimensions['OperationType']),
IntegrationCategory = tostring(customDimensions['IntegrationCategory']),
IntegrationSubCategory = tostring(customDimensions['IntegrationSubCategory']),
StartDateTime = todatetime(customDimensions['StartDateTime']),
EndDateTime = todatetime(customDimensions['EndDateTime'])
| project
CorrelationId,
EntityName,
EntityId,
IntegrationStatus,
IntegrationCategory,
IntegrationSubCategory,
OperationType,
StartDateTime,
EndDateTime,
timeTaken = datetime_diff('millisecond', EndDateTime, StartDateTime)
| where IntegrationCategory == 'Student-Reach Pull Integration'
| summarize
RunCount = count(),
SuccessCount = countif(IntegrationStatus == 'Success'),
FailedCount = countif(IntegrationStatus == 'Failed'),
WarningCount = countif(IntegrationStatus == 'Success (with warning)'),
PendingCount = countif(IntegrationStatus == ''),
SuccessRate = (countif(IntegrationStatus in('Success', 'Success (with warning)')) * 100) / count(),
AvgRunTime = avg(timeTaken)
by EntityNameQuery Snippet for the Pull Based Student Integration Flows to view the Integration Log details based on a Tracking Id.For information on the Tracking Id for a flow, see Steps to View the Tracking Id for a Flow.
Copytraces| where customDimensions['Trackingid'] == "a9eba018-0421-45b5-9604-4fc708c4a17e"
-
Click Run.
The Application Insight details for the flows will be generated and displayed.
The following images illustrate the Application Insights details generated for each type of integration flow:
-
Anthology Student to Anthology Reach (CNS-CNE) Flows
-
Anthology Reach to Anthology Student (CNE-CNS) Flows
-
Pull Based Student Integration Flows
-
Integration Log Details Based on a Tracking Id for Pull Based Student Integration Flows
The query result provides additional details to troubleshoot any error that occurred when the flow was run.
-