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

Output a JSON log #1022

Closed
ravenac95 opened this issue Oct 2, 2018 · 1 comment
Closed

Output a JSON log #1022

ravenac95 opened this issue Oct 2, 2018 · 1 comment
Labels
c:common Category: common libraries p:2 Priority: desired feature s:good first issue Status: good for newcomers

Comments

@ravenac95
Copy link
Contributor

In order to improve the logging as a debugging tool it would be nice to have JSON logs from all containers so that we easily parse (our centralized logging does this automatically) information to have more organized and easier to search through logs.

Useful information to have in logs:

Some caveats with our logging infrastructure:

  • The JSON parsing of logs on elasticsearch assumes that field's type is static. It implies the type based on the first occurrence of a field for the day. For example, if you have the log {"foo": 13, "message": "hello"} the type for foo will be a number for the rest of the day. If, later in the same day, elasticsearch encounters a log {"foo": "some_string", "message": "hello"} then the log message will fail to parse correctly, an error will be generated on the logstash logs, and elasticsearch will NOT have that data available.

An identical issue will also be posted on runtime-ethereum

Acceptance Criteria

  • All applications output JSON logs by default
@kostko
Copy link
Member

kostko commented Oct 3, 2018

The Go node already outputs JSON logs.

The Rust compute worker currently doesn't and the Rust log crate that we use currently does not support structured logging. We would need to switch to something like slog to support this. Shouldn't be that hard but requires some work.

@kostko kostko added s:good first issue Status: good for newcomers p:2 Priority: desired feature c:common Category: common libraries labels Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:common Category: common libraries p:2 Priority: desired feature s:good first issue Status: good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants