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

Logs stopped sending to Datadog after updating Serilog to v4.0.0 #114

Closed mikebro closed 2 months ago

mikebro commented 2 months ago

Hello,

We updated our Serilog dependencies and the sink stopped sending logs to Datadog. It happened after updating these libraries:

We are running on .NET 8

tobz commented 2 months ago

@mikebro 👋🏻

What version of Serilog and Serilog.Sinks.PeriodicBatching were you using before?

mikebro commented 2 months ago

Hi @tobz, Serilog v3.1.1 and Serilog.Sinks.PeriodicBatching v3.1.0

jszwedko commented 2 months ago

Hi @mikebro ,

I'm having trouble reproducing this with Serilog v4.0.0, Serilog.Sinks.PeriodicBatching v5.0.0, and v0.5.2 of this plugin. Are you using v0.5.2 of this plugin? If so, is there any chance you could put together a small example project that demonstrates the issue?

mikebro commented 2 months ago

Hi @jszwedko,

I believe the actual cause is DataDog/dd-trace-dotnet#5649 and not related to Serilog.Sinks.Datadog.Logs so I'll close this issue.

While trying to reproduce I noticed that the logs were being sent to Datadog and could be seen in the live tail, they just weren't being indexed. We depend on the env tag for indexing and it was missing when using Serilog v4. After some searching I realized we don't set this property, it seems to be added by Datadog.Trace.

jszwedko commented 2 months ago

Ah, gotcha, thanks for following up!