Application Insights Transaction Trace custom properties

Casper Rubæk 246 Reputation points
2021-06-24T19:32:09.817+00:00

I am trying to send custom properties as Ilogger params objects to Application Insights, but the code is not working.
How should the Ilogger code be implemented to achieve this?

The code looks like this in my function app:

109028-image.png

The composition of Ilogger.LogCritical looks like this:

109080-image.png

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,246 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,516 Reputation points Microsoft Employee
    2021-06-25T13:13:22.127+00:00

    @Casper Rubæk You would have to either leverage structured logging to include properties into your logs that show up as customDimensions for each entry or better yet setup custom telemetry and set properties in the context for all logs (as shown in this SO answer). These will be included with trace events.

    0 comments No comments

0 additional answers

Sort by: Most helpful