Logic App Standard tracked properties not showing up in Application Insights logs

Amit Anand 60 Reputation points
2024-03-20T18:40:32.0466667+00:00

Hi There,

I am trying to log some tracked properties from Azure Logic App Standard to Azure Application Insights, however even after setting up all the Configurations the track properties are not showing up in the Application Insights Logs. Below are some details about the Logic App (Standard) and the settings that I have enabled.

  • Logic App Workflow Type: Stateful Trigger: When messages are available in Queue (Peek Lock). Trigger Type: In App (built-in) because my Logic Apps are deployed in an ASE V3. Track Properties: I am trying to get the messageId as the Split-On Tracking Id by using the following expression @triggerOutputs()?['body']?['messageId'].

"splitOn": "@triggerOutputs()?['body']",

"splitOnConfiguration": {

"correlation": {

"clientTrackingId": "@triggerOutputs()?['body']?['messageId']"

}

}

When I save the workflow, it gets saved successfully and even runs as expected but the Tracked Properties never appear in the Custom Dimensions column of the Application Insights logs when I look for traces for this workflow. Please be informed that the other logs for this workflow are getting logged.

Similarly I tried adding a tracked property to a simple InitializeVariable action but it doesn't work there too.

  • Action Type: InitializeVariable { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "Id", "type": "string", "value": "@{variables('QueueMessageBody')?['Details']?['Id']}" } ] }, "runAfter": { "Initialize_Message_Body": [ "Succeeded" ] }, "trackedProperties": { "RequestId": "@{action()['inputs']?['variables'][0].value}" } }

Even when I change the value of the Tracked Property to something hard coded, it still doesn't show up in the logs.

Below are the settings that I have enabled for my Logic App.

  1. My Logic App is connected to an Application Insights Resource.
  2. I have a Log Analytics Workspace Created in the same resource group.
  3. Under Logic App Diagnostic settings, I have enabled it for Log Analytics Workspace and have configured the collection of the following data.
    1. Workflow Runtime Logs
    2. Function Application Logs
    3. AllMetrics

Any help is highly appreciated.

Thanks and Regards,

Amit Anand

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,996 questions
0 comments No comments
{count} votes

Accepted answer
  1. brtrach-MSFT 15,791 Reputation points Microsoft Employee
    2024-04-02T22:41:39.97+00:00

    @Amit Anand It’s important to ensure that your Logic App is correctly connected to an Application Insights Resource and that you have a Log Analytics Workspace created in the same resource group. From your message, it seems like you’ve already done this.

    You mentioned that you’re trying to get the messageId as the Split-On Tracking Id by using the expression @triggerOutputs()?['body']?['messageId']. This seems correct, assuming that messageId is a property of the body of the trigger output.

    However, there are a few things you could check:

    1. Expression Evaluation: Ensure that the expressions you’re using to set the tracked properties are being evaluated correctly. You can check this by adding an action to your Logic App that outputs the result of the expression to the run history. For example, you could use a Compose action with the same expression you’re using for the tracked property.
    2. Data Type: Make sure that the data type of the tracked property matches the data type of the value you’re assigning to it. For example, if messageId is a string, then the tracked property should also be a string.
    3. Configuration: Check the configuration of your function app. Navigate to your function app in the Azure portal and select “Diagnose and solve problems” to open Azure Functions diagnostics.

    Let us know the outcome of the above suggestions by replying to this message so we can assist you further.


0 additional answers

Sort by: Most helpful