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

Use logfmt instead of terminal format #226

Merged
merged 3 commits into from
Jan 31, 2024
Merged

Conversation

dmanc
Copy link
Contributor

@dmanc dmanc commented Jan 30, 2024

Why are these changes needed?

Right now our logs look like this:

INFO [01-30|15:23:34.705|github.com/Layr-Labs/eigenda/disperser/dataapi/server.go:514] server running                           addr=:8080 caller=server.go:514

This is because we use "Terminal Format" which should really only be used in development.

Grafana will have an easier time parsing the log if we use logfmt (brandur.org):

t=2024-01-30T15:25:39-0800 lvl=dbug msg="Getting blob metadata"               batchHeaderHash="[48 120 51 50 54 54 101 54 57 50 102 97 98 101 97 57 102 57 102 55 51 52 51 99 98 101 49 97 97 57 53 100 97 52 56 57 98 54 52 99 101 53 53 49 97 53 56 54 55 52 102 51 48 101 55 48 54 98 100 102 48 99 48 57 98 99]" caller=server.go:425

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@jianoaix
Copy link
Contributor

We have a use case for terminal log: the nodeplugin used by the operators. May need to check the output there to make sure it's good.

@dmanc
Copy link
Contributor Author

dmanc commented Jan 30, 2024

We have a use case for terminal log: the nodeplugin used by the operators. May need to check the output there to make sure it's good.

Good point, what do you think about making the format a config flag and make current behavior the default?

@jianoaix
Copy link
Contributor

We have a use case for terminal log: the nodeplugin used by the operators. May need to check the output there to make sure it's good.

Good point, what do you think about making the format a config flag and make current behavior the default?

SG

Copy link
Contributor

@shrimalmadhur shrimalmadhur left a comment

Choose a reason for hiding this comment

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

LGTM - we should work on using single log framework across repos.

@dmanc dmanc merged commit 57f0556 into Layr-Labs:master Jan 31, 2024
3 of 4 checks passed
bxue-l2 pushed a commit to bxue-l2/eigenda that referenced this pull request Feb 2, 2024
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.

5 participants