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

[Core] Enable JSON Structured Logging Format in Ray #50471

Merged
merged 15 commits into from
Feb 13, 2025
Merged

[Core] Enable JSON Structured Logging Format in Ray #50471

merged 15 commits into from
Feb 13, 2025

Conversation

MengjinYan
Copy link
Collaborator

Why are these changes needed?

  1. Added the JSON logging format option in Ray
  2. Update the API doc as well as the ray logging doc according to the change:
    • Rearranged the sections in existing ray logging document
    • Copied the content of the structured logging document from Anyscale document to ray logging document

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@MengjinYan MengjinYan requested a review from a team as a code owner February 12, 2025 06:22
Signed-off-by: Mengjin Yan <[email protected]>
@MengjinYan MengjinYan added the go add ONLY when ready to merge, run all tests label Feb 12, 2025
Copy link
Contributor

@dayshah dayshah left a comment

Choose a reason for hiding this comment

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

just docs review, recommend setting up vale https://docs.ray.io/en/latest/ray-contribute/docs.html#vale and looking into active vs. passive voice https://developers.google.com/style/voice, that's usually a majority of the docs comments

In both `TEXT` and `JSON` encoding formats, the logs include Ray-specific fields such as `job_id`, `worker_id`, `node_id`, `actor_id`, and `task_id`, if available.

* `log_level`: The log level for the driver process. The default is `INFO`.
Available log levels are defined in the [Python logging library](https://docs.python.org/3/library/logging.html#logging-levels).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Available log levels are defined in the [Python logging library](https://docs.python.org/3/library/logging.html#logging-levels).
Python defines available log levels in the [Python logging library](https://docs.python.org/3/library/logging.html#logging-levels).

active vs. passive

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think here it falls into the following exception scenarios of the active vs. passive:

To emphasize an object over an action.

It is to emphasize the available log levels the users can set.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we still want to prefer active voice most times, but ya i see what you're saying. Very minor though I don't think it makes much of a diff here either way

MengjinYan and others added 9 commits February 12, 2025 10:02
@@ -221,7 +221,7 @@ All Ray loggers are automatically configured in ``ray._private.ray_logging``. To
import logging
Copy link
Contributor

Choose a reason for hiding this comment

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

@angelinalg can you help review this file pls?

@edoakes edoakes enabled auto-merge (squash) February 12, 2025 22:52
@github-actions github-actions bot disabled auto-merge February 12, 2025 22:52
Copy link
Contributor

@dayshah dayshah left a comment

Choose a reason for hiding this comment

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

lgtm from docs perspective

@edoakes edoakes merged commit 02d3f3c into master Feb 13, 2025
6 checks passed
@edoakes edoakes deleted the CORE-691 branch February 13, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants