tracked proeprties not showing up

DD 1 Reputation point
2021-07-02T00:39:40.437+00:00

I added tracked properties in logic app; but they don't show up in Log analytics

the tracked properties column is empty. They are not showing up even after 10 hours of adding.

Is this the right way of adding tracked properties? I am following the Microsoft tutorial

https://learn.microsoft.com/en-us/azure/logic-apps/monitor-logic-apps-log-analytics

"trackedProperties": {
"displayonweb": "@朱大星 ().inputs.body.value[0].my_prop",
"serviceOutletId": "@朱大星 ().inputs.body.value[0].my_prop2"
},

111059-image.png

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,149 questions
{count} votes

2 answers

Sort by: Most helpful
  1. 2021-07-16T01:09:28.31+00:00

    hi @Samara Soucy - MSFT

    I am still facing the issue; I am still not seeing the tracked properties in Log analytics.

    I have posted the json below - removing sensitive info. It is a large logic app - 410 lines of json

    The relevant lines where I am tracking the properties are - 275-277

    Could you please have a look and let me know if it is right or if it needs any modification so that tracked properties display in log analytics ?

    {  
        "definition": {  
            "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",  
            "actions": {  
                "If_mycompany_websitedisplayname_eq_true_and_statecode_eq_0": {  
                    "actions": {  
                        "For_each_LGA": {  
                            "actions": {  
                                "Append_to_areasCoveredArray": {  
                                    "inputs": {  
                                        "name": "areasCoveredArray",  
                                        "value": {  
                                            "name": "@body('Get_LGA')?['mycompany_name']",  
                                            "postcode": "@body('Get_LGA')?['mycompany_postcode']"  
                                        }  
                                    },  
                                    "runAfter": {  
                                        "Get_LGA": [  
                                            "Succeeded"  
                                        ]  
                                    },  
                                    "type": "AppendToArrayVariable"  
                                },  
                                "Get_LGA": {  
                                    "inputs": {  
                                        "host": {  
                                            "connection": {  
                                                "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"  
                                            }  
                                        },  
                                        "method": "get",  
                                        "path": "/datasets/@{encodeURIComponent(encodeURIComponent('orge16cb598.crm6'))}/tables/@{encodeURIComponent(encodeURIComponent('mycompany_lgas'))}/items/@{encodeURIComponent(encodeURIComponent(items('For_each_LGA')?['mycompany_lgaid']))}"  
                                    },  
                                    "runAfter": {},  
                                    "type": "ApiConnection"  
                                }  
                            },  
                            "foreach": "@body('List_areas_covered')?['value']",  
                            "runAfter": {  
                                "List_areas_covered": [  
                                    "Succeeded"  
                                ]  
                            },  
                            "type": "Foreach"  
                        },  
                        "For_each_facility_type": {  
                            "actions": {  
                                "Append_to_facilityIdLabelArray_array": {  
                                    "inputs": {  
                                        "name": "facilityIdLabelArray",  
                                        "value": {  
                                            "id": "@body('Get_each_facility_id')?['mycompany_facilityfeatureid']",  
                                            "label": "@body('Get_each_facility_id')?['mycompany_name']",  
                                            "type": "@body('Get_each_facility_id')?['_mycompany_type_label']"  
                                        }  
                                    },  
                                    "runAfter": {  
                                        "Get_each_facility_id": [  
                                            "Succeeded"  
                                        ]  
                                    },  
                                    "type": "AppendToArrayVariable"  
                                },  
                                "Get_each_facility_id": {  
                                    "inputs": {  
                                        "host": {  
                                            "connection": {  
                                                "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"  
                                            }  
                                        },  
                                        "method": "get",  
                                        "path": "/datasets/@{encodeURIComponent(encodeURIComponent('orge16cb598.crm6'))}/tables/@{encodeURIComponent(encodeURIComponent('mycompany_facilityfeatures'))}/items/@{encodeURIComponent(encodeURIComponent(items('For_each_facility_type')?['mycompany_facilityfeatureid']))}"  
                                    },  
                                    "runAfter": {},  
                                    "type": "ApiConnection"  
                                }  
                            },  
                            "foreach": "@body('List_facilityfeatures_of_outlet')?['value']",  
                            "runAfter": {  
                                "List_facilityfeatures_of_outlet": [  
                                    "Succeeded"  
                                ]  
                            },  
                            "type": "Foreach"  
                        },  
                        "For_each_service_type": {  
                            "actions": {  
                                "Append_to_serviceIdLabelArray": {  
                                    "inputs": {  
                                        "name": "serviceIdLabelArray",  
                                        "value": {  
                                            "id": "@body('List_servicetype_by_GUID')?['value'][0]['mycompany_servicetypeid']",  
                                            "label": "@body('List_servicetype_by_GUID')?['value'][0]['mycompany_name']"  
                                        }  
                                    },  
                                    "runAfter": {  
                                        "List_servicetype_by_GUID": [  
                                            "Succeeded"  
                                        ]  
                                    },  
                                    "type": "AppendToArrayVariable"  
                                },  
                                "List_servicetype_by_GUID": {  
                                    "inputs": {  
                                        "host": {  
                                            "connection": {  
                                                "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"  
                                            }  
                                        },  
                                        "method": "get",  
                                        "path": "/datasets/@{encodeURIComponent(encodeURIComponent('orge16cb598.crm6'))}/tables/@{encodeURIComponent(encodeURIComponent('mycompany_servicetypes'))}/items",  
                                        "queries": {  
                                            "$filter": "mycompany_servicetypeid eq @{items('For_each_service_type')?['mycompany_servicetypeid']}"  
                                        }  
                                    },  
                                    "runAfter": {},  
                                    "type": "ApiConnection"  
                                }  
                            },  
                            "foreach": "@body('List_servicetypes_of_outlet')?['value']",  
                            "runAfter": {  
                                "List_servicetypes_of_outlet": [  
                                    "Succeeded"  
                                ]  
                            },  
                            "type": "Foreach"  
                        },  
                        "List_areas_covered": {  
                            "inputs": {  
                                "host": {  
                                    "connection": {  
                                        "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"  
                                    }  
                                },  
                                "method": "get",  
                                "path": "/datasets/@{encodeURIComponent(encodeURIComponent('orge16cb598.crm6'))}/tables/@{encodeURIComponent(encodeURIComponent('mycompany_mycompany_lga_pnp_serviceoutletset'))}/items",  
                                "queries": {  
                                    "$filter": "pnp_serviceoutletid eq @{triggerBody()?['pnp_serviceoutletid']}"  
                                }  
                            },  
                            "runAfter": {  
                                "For_each_facility_type": [  
                                    "Succeeded"  
                                ]  
                            },  
                            "type": "ApiConnection"  
                        },  
                        "List_facilityfeatures_of_outlet": {  
                            "inputs": {  
                                "host": {  
                                    "connection": {  
                                        "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"  
                                    }  
                                },  
                                "method": "get",  
                                "path": "/datasets/@{encodeURIComponent(encodeURIComponent('orge16cb598.crm6'))}/tables/@{encodeURIComponent(encodeURIComponent('mycompany_mycompany_facilityfeature_serviceoutletset'))}/items",  
                                "queries": {  
                                    "$filter": "pnp_serviceoutletid eq @{triggerBody()?['pnp_serviceoutletid']}"  
                                }  
                            },  
                            "runAfter": {  
                                "For_each_service_type": [  
                                    "Succeeded"  
                                ]  
                            },  
                            "type": "ApiConnection"  
                        },  
                        "List_servicetypes_of_outlet": {  
                            "inputs": {  
                                "host": {  
                                    "connection": {  
                                        "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"  
                                    }  
                                },  
                                "method": "get",  
                                "path": "/datasets/@{encodeURIComponent(encodeURIComponent('orge16cb598.crm6'))}/tables/@{encodeURIComponent(encodeURIComponent('mycompany_mycompany_servicetype_pnp_serviceoutletset'))}/items",  
                                "queries": {  
                                    "$filter": "pnp_serviceoutletid eq @{triggerBody()?['pnp_serviceoutletid']}"  
                                }  
                            },  
                            "runAfter": {},  
                            "type": "ApiConnection"  
                        },  
                        "Update_Service_Outlet_in_Azure_Search": {  
                            "inputs": {  
                                "body": {  
                                    "value": [  
                                        {  
                                            "@@search.action": "mergeOrUpload",  
                                            "areas_covered": "@variables('areasCoveredArray')",  
                                            "facilitytypes_id_label": "@variables('facilityIdLabelArray')",  
                                            "globalservicetypeid": "@string(triggerBody()?['pnp_globalservicetype'])",  
                                            "globalservicetypelabel": "@triggerBody()?['_pnp_globalservicetype_label']",  
                                            "pnp_email": "@triggerBody()?['pnp_email']",  
                                            "pnp_fax": "@triggerBody()?['pnp_fax']",  
                                            "pnp_globalservicetype": "@triggerBody()?['pnp_globalservicetype']",  
                                            "pnp_longdescription": "@triggerBody()?['pnp_longdescription']",  
                                            "pnp_name": "@triggerBody()?['pnp_name']",  
                                            "pnp_phone": "@triggerBody()?['mycompany_phonedirect']",  
                                            "pnp_postaladdresspostcode": "@triggerBody()?['pnp_postaladdresspostcode']",  
                                            "pnp_postaladdresssuburbcity": "@triggerBody()?['pnp_postaladdresssuburbcity']",  
                                            "pnp_postallatitude": "@triggerBody()?['pnp_postallatitude']",  
                                            "pnp_postallongitude": "@triggerBody()?['pnp_postallongitude']",  
                                            "pnp_postallonglat": {  
                                                "coordinates": [  
                                                    "@triggerBody()?['pnp_postallongitude']",  
                                                    "@triggerBody()?['pnp_postallatitude']"  
                                                ],  
                                                "type": "Point"  
                                            },  
                                            "pnp_serviceoutletid": "@triggerBody()?['pnp_serviceoutletid']",  
                                            "pnp_shortdescription": "@triggerBody()?['pnp_shortdescription']",  
                                            "pnp_streetaddresscountry": "@triggerBody()?['pnp_streetaddresscountry']",  
                                            "pnp_streetaddresspostcode": "@triggerBody()?['pnp_streetaddresspostcode']",  
                                            "pnp_streetaddressstreet1": "@triggerBody()?['pnp_mainaddress']",  
                                            "pnp_streetaddresssuburbcity": "@triggerBody()?['pnp_streetaddresssuburbcity']",  
                                            "pnp_streetlatitude": "@triggerBody()?['pnp_streetlatitude']",  
                                            "pnp_streetlongitude": "@triggerBody()?['pnp_streetlongitude']",  
                                            "pnp_streetlonglat": {  
                                                "coordinates": [  
                                                    "@triggerBody()?['pnp_streetlongitude']",  
                                                    "@triggerBody()?['pnp_streetlatitude']"  
                                                ],  
                                                "type": "Point"  
                                            },  
                                            "servicetypes_id_label": "@variables('serviceIdLabelArray')",  
                                            "statecode": "@triggerBody()?['pnp_streetaddressstate']",  
                                            "streetaddressstatelabel": "@triggerBody()?['mycompany_streetaddressstate']",  
                                            "mycompany_centrerating": "@triggerBody()?['_mycompany_centrerating_label']",  
                                            "mycompany_displayonweb": "@string(triggerBody()?['mycompany_displayonweb'])",  
                                            "mycompany_villagesize": "@triggerBody()?['mycompany_villagesize']",  
                                            "mycompany_websitedisplayname": "@triggerBody()?['mycompany_websitedisplayname']",  
                                            "mycompany_websiteurl": "@triggerBody()?['mycompany_websiteurl']"  
                                        }  
                                    ]  
                                },  
                                "headers": {  
                                    "Content-Type": "application/json",  
                                    "api-key": "testapikey"  
                                },  
                                "method": "POST",  
                                "uri": "https://servicefinder-search.search.windows.net/indexes/serviceoutlets/docs/index?api-version=2019-05-06"  
                            },  
                            "runAfter": {  
                                "For_each_LGA": [  
                                    "Succeeded"  
                                ]  
                            },  
                            "type": "Http"  
                        }  
                    },  
                    "else": {  
                        "actions": {  
                            "If_mycompany_websitedisplayname_eq_false_and_statecode_eq_0": {  
                                "actions": {  
                                    "HTTP_POST_to_Azure_Search": {  
                                        "inputs": {  
                                            "body": {  
                                                "value": [  
                                                    {  
                                                        "@@search.action": "mergeOrUpload",  
                                                        "pnp_serviceoutletid": "@triggerBody()?['pnp_serviceoutletid']",  
                                                        "mycompany_displayonweb": "@string(triggerBody()?['mycompany_displayonweb'])"  
                                                    }  
                                                ]  
                                            },  
                                            "headers": {  
                                                "Content-Type": "application/json",  
                                                "api-key": "testapikey"  
                                            },  
                                            "method": "POST",  
                                            "uri": "https://servicefinder-search.search.windows.net/indexes/serviceoutlets/docs/index?api-version=2019-05-06"  
                                        },  
                                        "runAfter": {},  
                                        "trackedProperties": {  
                                            "displayonweb": "@action().inputs.body.value[0].mycompany_displayonweb",  
                                            "serviceOutletId": "@action().inputs.body.value[0].pnp_serviceoutletid"  
                                        },  
                                        "type": "Http"  
                                    }  
                                },  
                                "expression": {  
                                    "and": [  
                                        {  
                                            "equals": [  
                                                "@triggerBody()?['mycompany_displayonweb']",  
                                                false  
                                            ]  
                                        },  
                                        {  
                                            "equals": [  
                                                "@triggerBody()?['statecode']",  
                                                0  
                                            ]  
                                        }  
                                    ]  
                                },  
                                "runAfter": {},  
                                "type": "If"  
                            }  
                        }  
                    },  
                    "expression": {  
                        "and": [  
                            {  
                                "equals": [  
                                    "@triggerBody()?['mycompany_displayonweb']",  
                                    true  
                                ]  
                            },  
                            {  
                                "equals": [  
                                    "@triggerBody()?['statecode']",  
                                    0  
                                ]  
                            }  
                        ]  
                    },  
                    "runAfter": {  
                        "Initialize_areas_covered_array": [  
                            "Succeeded"  
                        ]  
                    },  
                    "type": "If"  
                },  
                "Initialize_areas_covered_array": {  
                    "inputs": {  
                        "variables": [  
                            {  
                                "name": "areasCoveredArray",  
                                "type": "Array"  
                            }  
                        ]  
                    },  
                    "runAfter": {  
                        "Initialize_facility_id_label_array": [  
                            "Succeeded"  
                        ]  
                    },  
                    "type": "InitializeVariable"  
                },  
                "Initialize_facility_id_label_array": {  
                    "inputs": {  
                        "variables": [  
                            {  
                                "name": "facilityIdLabelArray",  
                                "type": "Array"  
                            }  
                        ]  
                    },  
                    "runAfter": {  
                        "Initialize_service_id_label_array": [  
                            "Succeeded"  
                        ]  
                    },  
                    "type": "InitializeVariable"  
                },  
                "Initialize_service_id_label_array": {  
                    "inputs": {  
                        "variables": [  
                            {  
                                "name": "serviceIdLabelArray",  
                                "type": "Array"  
                            }  
                        ]  
                    },  
                    "runAfter": {},  
                    "type": "InitializeVariable"  
                }  
            },  
            "contentVersion": "1.0.0.0",  
            "outputs": {},  
            "parameters": {  
                "$connections": {  
                    "defaultValue": {},  
                    "type": "Object"  
                }  
            },  
            "triggers": {  
                "When_a_record_is_updated": {  
                    "inputs": {  
                        "host": {  
                            "connection": {  
                                "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"  
                            }  
                        },  
                        "method": "get",  
                        "path": "/datasets/@{encodeURIComponent(encodeURIComponent('orge16cb598.crm6'))}/tables/@{encodeURIComponent(encodeURIComponent('pnp_serviceoutlets'))}/onupdateditems"  
                    },  
                    "recurrence": {  
                        "frequency": "Minute",  
                        "interval": 3  
                    },  
                    "splitOn": "@triggerBody()?['value']",  
                    "type": "ApiConnection"  
                }  
            }  
        },  
        "parameters": {  
            "$connections": {  
                "value": {  
                    "dynamicscrmonline": {  
                        "connectionId": "/subscriptions/799d9407-ee12-4463-bf7a-b1f92f6f90e5/resourceGroups/mycompany-WebRedesign-PRD/providers/Microsoft.Web/connections/dynamicscrmonline-1",  
                        "connectionName": "dynamicscrmonline-1",  
                        "id": "/subscriptions/799d9407-ee12-4463-bf7a-b1f92f6f90e5/providers/Microsoft.Web/locations/australiasoutheast/managedApis/dynamicscrmonline"  
                    }  
                }  
            }  
        }  
    }  
    
    0 comments No comments

  2. Samara Soucy - MSFT 5,131 Reputation points
    2021-07-18T21:34:39.483+00:00

    It doesn't look like the issue is with the tracked properties specifically. I created an app that just uses the action with the tracked properties and an http trigger to create the data, and it does show up in log analytics. Can you verify that the properties are being populated in your trigger and that the if/then statements are resolving in a way that the action with the tracked properties is being run?

    {  
        "definition": {  
            "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",  
            "actions": {  
                "HTTP": {  
                    "inputs": {  
                        "body": {  
                            "value": [  
                                {  
                                    "@@search.action": "mergeOrUpload",  
                                    "mycompany_displayonweb": "@string(triggerBody()?['mycompany_displayonweb'])",  
                                    "pnp_serviceoutletid": "@triggerBody()?['pnp_serviceoutletid']"  
                                }  
                            ]  
                        },  
                        "headers": {  
                            "Content-Type": "application/json"  
                        },  
                        "method": "POST",  
                        "uri": "https://httpbin.org/post"  
                    },  
                    "runAfter": {},  
                    "trackedProperties": {  
                        "displayonweb": "@action().inputs.body.value[0].mycompany_displayonweb",  
                        "serviceOutletId": "@action().inputs.body.value[0].pnp_serviceoutletid"  
                    },  
                    "type": "Http"  
                }  
            },  
            "contentVersion": "1.0.0.0",  
            "outputs": {},  
            "parameters": {},  
            "triggers": {  
                "manual": {  
                    "inputs": {},  
                    "kind": "Http",  
                    "type": "Request"  
                }  
            }  
        },  
        "parameters": {}  
    }  
    

    115666-2021-07-18-17-32-00-runs-microsoft-azure.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.