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

Draft: log timestamps in RFC3339Nano #537

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alextes
Copy link
Contributor

@alextes alextes commented Oct 5, 2023

📝 Summary

  • Changes the timestamp format to human-readable RFC3339.
  • Increases the precision to nanosecond from second.

⛱ Motivation and Context

Current log precision is on the second level. On a high volume relay bids are in the hundreds per second, meaning logs, in the thousands, will share the same timestamp and lose their ordering. This would return ordering, and as a bonus make timestamps human-readable.

📚 References


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

- Changes the timestamp format to human-readable RFC3339.
- Increases the precision to nanosecond from second.
@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (c52858a) 33.26% compared to head (6523b33) 33.35%.
Report is 10 commits behind head on main.

Files Patch % Lines
common/logging.go 0.00% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #537      +/-   ##
==========================================
+ Coverage   33.26%   33.35%   +0.09%     
==========================================
  Files          24       24              
  Lines        5090     5315     +225     
==========================================
+ Hits         1693     1773      +80     
- Misses       3178     3318     +140     
- Partials      219      224       +5     
Flag Coverage Δ
unittests 33.35% <0.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JustinDrake
Copy link

Side note: this was discussed at the end of MEV Boost call 6.

@metachris
Copy link
Collaborator

In mev-boost we're using this with millisecond precision: https://github.com/flashbots/mev-boost/blob/develop-deneb/cli/main.go#L223-L234 + https://github.com/flashbots/mev-boost/blob/develop-deneb/config/vars.go#L14

Any reason for nanoseconds over millis?

@metachris metachris closed this Jan 19, 2024
@metachris metachris reopened this Jan 19, 2024
@metachris
Copy link
Collaborator

(sorry accidentally clicked on close)

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

Successfully merging this pull request may close these issues.

4 participants