Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Logic App instances with workflow final status, workflow run id, client tracking id, and tracked properties.
traces
| where operation_Name == "FlowRunLastJob"
| extend resource = parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource))
| project timestamp
, LogicApp = tostring(cloud_RoleName)
, Workflow = tostring(resource.workflowName)
, WorkflowRunId = tostring(customDimensions.prop__flowRunSequenceId)
, ClientTrackingId = tostring(customDimensions.prop__clientTrackingId)
, WorkflowStatus = customDimensions.prop__status
| join kind = leftouter ( // trackedProperties
traces
| where customDimensions.prop__properties has "trackedProperties"
| extend trackedProperties = parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).trackedProperties))
| project InterfaceId = trackedProperties.InterfaceId
, WorkflowRunId = tostring(customDimensions.prop__flowRunSequenceId)
| where isnotnull(InterfaceId)
)
on $left.WorkflowRunId == $right.WorkflowRunId
| project timestamp
, LogicApp
, Workflow
, WorkflowRunId
, ClientTrackingId
, InterfaceId
, WorkflowStatus
| sort by timestamp desc
//| where LogicApp contains ""
//| where Workflow contains ""
//| where ClientTrackingId contains ""
//| where InterfaceId contains ""
//| where WorkflowStatus == "Succeeded"
//| where WorkflowStatus == "Failed"
//| where WorkflowStatus == "Cancelled"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment