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

Created timestamp on arrival of log in queue (preventing Out of Order) #55

Merged
merged 4 commits into from
Sep 9, 2021

Conversation

raphaelquati
Copy link
Contributor

In some situations, multithread applications can write logs in an "out of order" manner.

The sink object is a singleton and the source queue is synchronized, so it's safe to use the current timestamp at ILogEventSink.Emit

Resolves #49

@mishamyte mishamyte self-requested a review September 3, 2021 07:47
@mishamyte mishamyte added the enhancement New feature or request label Sep 3, 2021
Copy link
Member

@mishamyte mishamyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you cover this behavior with some unit tests, please?

src/Serilog.Sinks.Grafana.Loki/LokiBatchFormatter.cs Outdated Show resolved Hide resolved
@mishamyte
Copy link
Member

Seems like some tests are failing

@mishamyte mishamyte merged commit 0e09c63 into serilog-contrib:master Sep 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

Stops send log after Loki Error 'entry out of order' (Http status 400)
2 participants