Serilog - Add custom properties from Request Header to Application Insight Request logs for Azure function

Viewed 41

I have an Azure Function integrated with Serilog which logs to Application Insights. I have added the custom middleware to log user claims to LogContext. I can see those custom properties in AppInsight Trace logs. But i want to see the same custom properties in Request logs also in Application Insight. Is there a way to attach the custom user claims, so that i can see those in Application InSight Request Events/logs and also in Exception logs. Kindly advice with some sample.

0 Answers
Related