Replies: 1 comment 2 replies
-
Yes, every logger library does need to be updated to support it, namely, they need to implement this interface https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.abstractions.ibufferedlogger - it is explained there in the Remarks section. Specifically for the OpenTelemetry .NET, the place where timestamp update is here - there is no any config. It just needs to implement the interface :) P.S. converted to a Discussion. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I tried the log buffering and read through the proposal #5123 and discussion specific with the timestamping question. I also looked at the code and I see that the buffering does capture the timestamp before the log record gets written to the buffer. The .NET ConsoleLogger does print the correct timestamp (time of buffering).
Other log sinks (tried opentelemetry and serilog) seem to log the timestamp when the buffer is flushed (and first enters otel/serilog code), and do not use the timestamp the buffered logger code creates.
Can anyone just confirm these logger libraries need to be updated in order to use the correct timestamps and that the OpenTelemetry .NET log sink doesn't do that currently? Or is there a configuration to make them use the existing timestamps
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions