[Serve] Make it easier to view application-logs (aka logs that I write) in the ray-dashboard

Open
#41,006 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
observability

Research direction

Start by reviewing the Ray Serve monitoring and Ray logging documentation linked in the issue, then read the linked Slack discussion for the intended direction. Inspect how application logs are displayed in the Ray dashboard and define done as making application-level logs easy to distinguish or filter without redundant deployment context.

Written by the indexing model from the issue text.

Description

dashboard enhancement observability P2 serve
Description

When I am developing, I would like to debug my application by easily viewing my application's logs in the ray-dashboard. Right now the application logs are intermixed with the core ray logs.

Full discussion in this slack thread: https://ray-distributed.slack.com/archives/CNCKBBRJL/p1699328167338449

Use case

Currently I log things in ray-serve like this:

# At the top of your file: 
import logging
logger = logging.getLogger("ray.serve")

# When you want to log something: 
logger.info("Hi from call - logger")

As per the instructions here:

This ends up being shown in the ray-serve dashboard like this:

image

There are several issues with this:

  1. Key Issue: it is hard for me to find my application level logs distinctly from the ray system level logs
  2. Secondary Issue: There is a lot of redundant info in the logs. In the ray dashboard, I on a page for a specific deployment, so I don't need the deployment's name and instance to be printed on every line
Possible Solution

One solution, to allow me to filter for just my application level logs would be to print the full path of the file:

Current: INFO 2023-11-06 18:55:14,971 app_Pipeline app_Pipeline#StyBUT KkTVnifWpg /http-endpoint app_stuff file.py:105 - Hi from call - logger 
Possible: INFO 2023-11-06 18:55:14,971 app_Pipeline app_Pipeline#StyBUT KkTVnifWpg /http-endpoint app_stuff my_package.file:105 - Hi from call - logger 

This would allow my to filter the UI for my_package:

image
Dominant language
Python
Stars
43.9k
Forks
8.1k
Avg merge
4d 12h
Merged PRs (30d)
234

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ray-project/ray

All issues in ray-project/ray

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.