DataDog / serilog-sinks-datadog-logs

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

Upgrade to Serilog 4 with built-in batching support #115

Open khavish-bhundoo-cko opened 4 months ago

khavish-bhundoo-cko commented 4 months ago

Serilog supports native batching with no dependency on Serilog.Sinks.PeriodicBatching. It uses channels and will be easier to upgrade in the future and also benefit from performance improvements.

https://github.com/serilog/serilog/releases/tag/v4.0.0

Is there a plan to use native batching?

remeh commented 4 months ago

Hey @khavish-bhundoo-cko, thanks for your message.

Currently there is no plan to use native batching, but it doesn't mean we won't do it: I'm adding this as a feature-request on our end.

It uses channels and will be easier to upgrade in the future and also benefit from performance improvements.

Would you know if, theoretically, it would already brings performance improvements or if it's most than it will be better supported in the future and performance improvements will most likely happen?

khavish-bhundoo-cko commented 1 month ago

@remeh Apologies for the late reply, I missed your comment.

I haven't benchmarked it to be able to give you the numbers. Serilog 4 will remove the need for Serilog.Sinks.PeriodicBatching which means better support in the future including performance as well as native batching support. There are already performance improvements namely reduction in memory allocations for e.g https://github.com/serilog/serilog/pull/2090