Share via


Tracked Properties

Question

Monday, January 28, 2019 11:50 AM

I'd created a logic app in which a file gets created for each run. The name of the file is generated by the app during each run. I'd like to get that name in the tracked properties of my app. What sort of an expression can I use for this?

All replies (3)

Tuesday, January 29, 2019 10:54 AM | 1 vote

You can checkout this blog for details if that helps.

From the document:

To track inputs or outputs in diagnostics data, you can add tracked properties to actions in your logic app's JSON definition. Tracked properties can track only a single action's inputs and outputs, but you can use the correlation properties of events to correlate across actions in a run.

To track one or more properties, add the trackedProperties section and the properties you want to the action definition. For example, suppose you want to track data like an "order ID" in your telemetry:

"myAction": {
  "type": "http",
  "inputs": {
      "uri": "http://uri",
      "headers": {
          "Content-Type": "application/json"
      },
      "body": "@triggerBody()"
  },
  "trackedProperties": {
      "myActionHTTPStatusCode": "@action()['outputs']['statusCode']",
      "myActionHTTPValue": "@action()['outputs']['body']['<content>']",
      "transactionId": "@action()['inputs']['body']['<content>']"
  }
}

Tuesday, January 29, 2019 2:40 PM

I'd tried this one but it didn't work. The structure of my logic app is as follows. Each time I run it, a new file is created on one om the local servers. For every run a unique file name is created using 'guid' function. I want to view that in Tracked Properties of this app from Azure Monitor. That's fine adding this property to any of these steps.

Trying the expressions similar to the ones that you've provided didn't reflect anything while checking from Azure Monitor. Please suggest me with some other way.


Wednesday, January 30, 2019 10:35 AM

Can you please provide a code view of your LA so that I can try it at my side using your scenario.