question

CasperRubaek avatar image
0 Votes"
CasperRubaek asked PramodValavala-MSFT answered

Application Insights Transaction Trace custom properties

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
image.png (46.4 KiB)
image.png (18.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered

@CasperRubaek 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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.