DataDog / serilog-sinks-datadog-logs

Serilog Sink that sends log events to Datadog https://www.datadoghq.com/
Apache License 2.0
60 stars 41 forks source link

'LogContext.PushProperty()' does not add keys to log event attributes #74

Closed Kiechlus closed 2 years ago

Kiechlus commented 2 years ago

We usually use the following code to add event attributes to datadog logs. However, using the Serilog Sink on Azure functions, we do not succeed with that (see screenshot). Is there anything we can do about it? Is this supported?

using (Serilog.LogContext.PushProperty("MessageContent", serviceBusMessage, true))
using (Serilog.LogContext.PushProperty("CorrelationId", correlationId))
{
    // Do some logging
}

image

Kiechlus commented 2 years ago

This is our bad, we forgot to call .Enrich.FromLogContext() and install some datadog packages.