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

Timestamp Rounding #53

Closed
udovichenkoAlexander opened this issue Dec 17, 2019 · 2 comments
Closed

Timestamp Rounding #53

udovichenkoAlexander opened this issue Dec 17, 2019 · 2 comments
Assignees

Comments

@udovichenkoAlexander
Copy link

I see that timestamp rounding in GELF is 3
https://github.com/whir1/serilog-sinks-graylog/blob/51c5f255729eb3e5dd5615f238f8456cc19bbe14/src/Serilog.Sinks.Graylog.Core/Extensions/DateTimeExtensions.cs#L17

Is this enough value? we have wrong sorting when logging.
Example:

 _logger.LogDebug("1");
 _logger.LogDebug("2");
 _logger.LogDebug("3");
 _logger.LogDebug("4");
 _logger.LogDebug("5");
 _logger.LogDebug("6");
 _logger.LogDebug("7");
 _logger.LogDebug("8");
 _logger.LogDebug("9");
 _logger.LogDebug("10");

Maybe value ​​can be increased or customizable?

@whir1
Copy link
Contributor

whir1 commented Dec 20, 2019

I removed rounding and timestamp sends like "1576822447.5433211" but it isn't help you because respose from graylog cluster looks like

"message": { "_id": "190e7480-22ee-11ea-a60d-0242ac120004", "facility": "VolkovTestFacility", "full_message": "null", "gl2_remote_ip": "10.10.76.60", "gl2_remote_port": 62898, "gl2_source_input": "572afd924cedfd0001a14c62", "gl2_source_node": "07040d98-9ce8-4c0e-844b-041cc92994b8", "level": 6, "message": "7", "source": "MOW1-D466", "streams": [ "578f96464cedfd0001689467", "000000000000000000000001" ], "stringLevel": "Information", "timestamp": "2019-12-20T06:01:00.560Z" }

And this timestamp can't sort correctly in Graylog UI

@whir1 whir1 self-assigned this Dec 20, 2019
@udovichenkoAlexander
Copy link
Author

udovichenkoAlexander commented Dec 20, 2019

Ок. I build local version without rounding and check it. It send OK, but it still wrong sort in gray log.
Thank you, for help, I close this issue.
It's GrayLog (or GrayLog setup issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants