ApplicationInsights-JS icon indicating copy to clipboard operation
ApplicationInsights-JS copied to clipboard

Can I separate customDimensions in trackEvent log?

Open madebymt opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. I am using this trackEvent to log my app event, but anything in properties show up in the log is a object not a separate columns, so it's easier for us to track the data.

Thank you!

appInsights.trackEvent({
  name: 'some event',
  properties: { // accepts any type
    prop1: 'string',
    prop2: 123.45,
    prop3: { nested: 'objects are okay too' }
  }
});

Here's the CSV I export form appInsight --> Transaction search ---> view log ---> Export Screenshot 2023-09-18 at 3 12 39 PM

Describe the solution you'd like I want each object field to be their own column

Additional context Add any other context or screenshots about the feature request here.

Version I use: @microsoft/applicationinsights-web: "^3.0.0",

madebymt avatar Sep 18 '23 20:09 madebymt

You can use project or extend KQL operators to flatten, select, and rename the properties you want, before exporting to CSV.

https://learn.microsoft.com/en-us/azure/azure-monitor/logs/get-started-queries#use-project-and-extend-to-select-and-compute-columns

johncrim avatar Dec 08 '23 00:12 johncrim