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

Changed the order of the field in json log output #333

Merged
merged 1 commit into from Dec 17, 2023
Merged

Conversation

freakmaxi
Copy link
Contributor

I've changed the order of the fields for JSON output for better observability when logs are dumped in a file and require eye inspection.

I believe the following order

time - level - message - (rest of the log fields)...

for the logs output would be better to catch the desired logs...

@bconn98
Copy link
Collaborator

bconn98 commented Dec 14, 2023

Hmm, this aligns better with what I've seen in the past but I'm not sure how I feel about it. IMO JSON logging is mostly for being parsed by tools such as ELK stack and not by users eyes.

@freakmaxi
Copy link
Contributor Author

Hmm, this aligns better with what I've seen in the past but I'm not sure how I feel about it. IMO JSON logging is mostly for being parsed by tools such as ELK stack and not by users eyes.

To be honest, we are using it in multiple ways. One is checking the log outputs on the pod console in Kubernetes, which is the first and quick eye inspection and which is hard to capture which output is about what, and those logs are collected by fluent and pushed to elastic. We can query using Kibana (no problem here). However, also we have an exporter, which collects console logs and pushes them to an S3 bucket to analyze them for both user inspection and automated analysis. User inspection part is a bit painful because of the field order.

@estk estk enabled auto-merge (squash) December 17, 2023 03:40
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (97c1347) 61.23% compared to head (ee30d2b) 61.12%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #333      +/-   ##
==========================================
- Coverage   61.23%   61.12%   -0.12%     
==========================================
  Files          23       23              
  Lines        1406     1407       +1     
==========================================
- Hits          861      860       -1     
- Misses        545      547       +2     

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

@estk estk merged commit ebb9123 into estk:main Dec 17, 2023
11 checks passed
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.

None yet

4 participants