Skip to content

log buffering (Microsoft.Extensions.Telemetry): Question regarding timestamp of records/IBufferedLogger w OpenTelemetry #6506

Description

@dlosch

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions