-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Serve] integrate with Ray structured logging #46215
[Serve] integrate with Ray structured logging #46215
Conversation
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
As discussed offline let's pop off Also why is this now included? |
oops, didn't pay attention, will remove |
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we decided to only config "ray.serve" logger not the root logger?
Co-authored-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: Gene Der Su <gdsu@ucdavis.edu>
Yea, I still feel it's a bit odd (and unnecessary) for Serve to configure the root logger. We can follow up on this if there are users who wants it :) |
Why are these changes needed?
Integrated Ray structured logging into Serve's logger. Two things are done in this PR:
_append_flatten_attributes()
and called it fromgenerate_record_format_attrs()
so Ray structured logging can apply those nested attributesJSONFormatter
when formatting structured logsThe main difference after integrated with Ray structured logging is there are new attributes provided by Ray (e.g.
node_id
,filename
, andlineno
). Also, the message format is just the message body itself, without filename and line number prefix.Example log before the change
Example log after the change
Related issue number
Closes #46125
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.