Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of microseconds and nanoseconds #208

Closed
1 task done
Zagrebelin opened this issue Oct 5, 2023 · 4 comments · Fixed by #209
Closed
1 task done

Lack of microseconds and nanoseconds #208

Zagrebelin opened this issue Oct 5, 2023 · 4 comments · Fixed by #209
Assignees
Labels
bug Something isn't working

Comments

@Zagrebelin
Copy link
Contributor

Which version of Serilog.Sinks.Grafana.Loki are you using?

v8.1.0

Which version of .NET are you using?

net7.0

Describe the bug

.net 7.0 and later provides a .Microsecond and .Nanosecond fields for the DateTimeOffset class. Existing code ignoring such precision and send only milliseconds.
This will cause the log line strings to be in disorder.
image

To Reproduce

Send a several log records during a single millisecond

Expected behavior

Respect microsecond and nanosecond part of datetime object.

Log/SelfLog output or exception with stacktrace

No response

Application or code sample, which could be used to reproduce a bug

No response

Additional context

No response

I have read the documentation

@mishamyte
Copy link
Member

Published as a part of v8.2.0-beta.2

@Mario-Hofstaetter
Copy link

@mishamyte in the beta release https://github.com/serilog-contrib/serilog-sinks-grafana-loki/releases/tag/v8.2.0-beta.2
you mistakenly linked issue 204 as "Lack of microseconds and nanoseconds in .NET 7 and later",
but its this issue #208 or PR #209

@mishamyte
Copy link
Member

@Mario-Hofstaetter thank you for finding that out. Human mistake, fixed))

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
3 participants