forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[serve] Improve access log messages (ray-project#48819)
## Why are these changes needed? Improves the Serve access log to include HTTP status information on the replica and better resemble standard log formats like `uvicorn`. I'm updated the log format to: - Include the HTTP method, route and status code for HTTP requests like: "GET / 200". - Use "CALL", the method name, and "OK"/"ERROR" for `DeploymentHandle` calls like: "CALL method_name OK". - Stop logging the `route` information on every message and isolate it to the access log message instead. This adds clutter and it can be tied to the access log message using the request ID. - Stop logging the filename and line number in every log message. This has been on my TODO list for awhile after internal discussion. ### Examples Calling a handle method: ``` INFO 2024-11-20 13:51:44,803 default_D lswbv98w d0cadb74-9fd8-4a68-9e9a-c9ed20b091f4 -- CALL method OK 1.3ms ``` Calling a basic HTTP route: ``` INFO 2024-11-20 13:53:00,197 default_A zosusx8c 26891433-a91a-4d27-b543-0936feb5f5c1 -- GET / 200 4.1ms ``` Calling a wildcard HTTP route (and non-200 status code): ``` INFO 2024-11-20 13:53:58,102 default_A iovmsu5e 85000f14-8e31-42a5-a1f4-0fa2d39c549a -- GET /{wildcard} 422 3.7ms ``` --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Signed-off-by: hjiang <dentinyhao@gmail.com>
- Loading branch information
Showing
8 changed files
with
197 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.