TinyBlueRobots/Serilog.Sinks.ILogger

Serilog enriched properties as Azure Custom Properties

Opened this issue · 3 comments

Hi,

I'm using the search associated with an Azure Function to view my logging and am wondering if enriched properties should be visible as Azure Custom Properties? If not is this something that's planned?

image

I don't know how we could do this. Having used Serilog to render the message the property names are lost, however, the ILogger would need them for the customer property names.

Thanks @JonCanning It would be really useful. I might try and find some time to investigate. Basically my use case is as follows

  1. Client makes a call to asp.net core api (entry point to solution)
  2. Serilog logging in API is enriched with TraceIdentifier using middleware
  3. API queues a request on azure queue storage. Request contains TraceIdentifier
  4. Azure QueueTrigger Function fires and de-queues request
  5. Serilog logging behind function is enriched with same TraceIdentifier

This allows me to trace a request through complete vertical via TraceIdentifier using Serilog enrichment. Would just be nice if TraceIdentifier property could be visible via the Azure custom properties aswell.