question

BaharulIslam-2413 avatar image
0 Votes"
BaharulIslam-2413 asked VenkateshDodda-MSFT commented

Tracked Property Query in Logic APP

Hi Expert,

I am trying to enhance monitoring feature in logic app following below link
https://docs.microsoft.com/en-us/azure/logic-apps/monitor-logic-apps-log-analytics

Here question is
1) Is it possible to display all tracked property in table column (name of all tracked property may not be known in advanced) using KQL ?
2) Is it possible to customize default dashboard from workspace solution view ?

azure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VenkateshDodda-MSFT avatar image
1 Vote"
VenkateshDodda-MSFT answered VenkateshDodda-MSFT commented

@Baharullslam-2413 Thanks for reaching out. To test this i have created a logic app with the following set of triggers and actions
i) Http request trigger with some JSON payload as input
ii) created a variable to pull a particular value from the JSON payload from the trigger and added couple of Tracking properties to this action as well
iii) created a blob in the storage account with variable value as a blob name.

1) Is it possible to display all tracked property in table column (name of all tracked property may not be known in advanced) using KQL ?

Yes, you can display all tracked property in table column by writing custom Kusto query. Below is the sample query that i have built based

 AzureDiagnostics
 | where TimeGenerated >=ago(10h)
 | where status_s =~ "Succeeded"
 | where workflowId_s == "<workflowId>" 
 | project-away Category,ResourceId,ResourceGroup,SubscriptionId,ResourceProvider,OperationName,Level,status_s,startTime_t,endTime_t,resource_location_s,resource_workflowId_g,resource_resourceGroupName_s,resource_subscriptionId_g,resource_runId_s,resource_workflowName_s,_schema_s,code_s,resource_triggerName_s,resource_actionName_s,executionClusterType_s,Type,_ResourceId,TenantId,SourceSystem,ResourceType
 | distinct trackedProperties_property1_s,trackedProperties_myTrackedPropertyName_s
 | project Tprop=pack_all(),trackedProperties_myTrackedPropertyName_s,trackedProperties_property1_s

Note : Here myTrackedPropertyName,property1 are my tracked properties that i have defined in my workflow.

Sample output for reference:

202779-image.png


2) Is it possible to customize default dashboard from workspace solution view ?

Unfortunately, we don't have any option to customize default dashboard from the workspace solution view at this moment. Alternatively, you can utilize the Azure Monitor workbooks by writing some custom Kusto queries you can create a custom dashboard. I would recommend you request for this feature here: Logic Apps · Community (azure.com)

Feel free to reach back to me if you have any further questions on this.


image.png (105.1 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you @VenkateshDodda-MSFT for your feedback. I got your query but here problem is if tomorrow developer add a new tracked property need to update query for Monitor view. What actually looking was if its possible to get all tracked property without mentioning name itself like something trackedProperties_* .

I have added feature request for dashboard customization features.

Thanks
Baharul Islam

0 Votes 0 ·

@BaharulIslam-2413 Thanks for your response. I have understood your concern in that case you can use the project-keep operator which can sort out the columns using the wildcard. I have made a few changes to the above share KQL query to pull only the tracked prosperities. Here is the updated KQL query.

 AzureDiagnostics
  | where TimeGenerated >=ago(10h)
  | where status_s =~ "Succeeded" and workflowId_s == "<worklflowID>" 
  | project-keep trackedProperties_*
  | extend  Tp=pack_all()

Feel Free to reach back to me if you have any further questions on this.

1 Vote 1 ·