Skip to content

[Serve] Rename some prometheus metrics#61090

Open
petern48 wants to merge 17 commits intoray-project:masterfrom
petern48:rename_serve_metrics
Open

[Serve] Rename some prometheus metrics#61090
petern48 wants to merge 17 commits intoray-project:masterfrom
petern48:rename_serve_metrics

Conversation

@petern48
Copy link
Copy Markdown
Contributor

@petern48 petern48 commented Feb 16, 2026

Description

This is a follow-up for #59220. In the PR review, a few metric renames were suggested. This PR implements those metric renames to follow better consistency.

Old metric names have not been removed for backwards compatibility. Instead, they have been deprecated, so they can be removed in the next major release. Updates have also been applied for Java as well.

Format: old_name -> new_name

  • ray_serve_replica_processing_queries -> ray_serve_replica_num_ongoing_requests
  • ray_serve_deployment_queued_queries -> ray_serve_router_num_queued_requests
  • ray_serve_num_ongoing_requests_at_replicas -> ray_serve_router_num_ongoing_requests_at_replicas

Related issues

Fixes #59376

Additional information

Note, I came up with a new name for the third metric myself because the comment in the original PR did not propose a specific new name. It only suggested that it should "explicitly say handle or router", so the name of the last metric is still up for discussion.

…rve_replica_num_ongoing_requests'

Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly renames the ray_serve_replica_processing_queries metric to ray_serve_replica_num_ongoing_requests and maintains backward compatibility by deprecating the old metric. The changes are applied across Python, Java, and documentation files.

I've identified a critical bug in the Java implementation where the new metric is not updated due to an overwritten variable. I've also found a bug in a dashboard panel definition where the new metric name is missing a prefix. Additionally, I've suggested an improvement to the monitoring documentation to explicitly mention the deprecated metric for clarity.

Overall, the changes are in the right direction, but the identified issues should be addressed to ensure correctness and consistency.

petern48 and others added 5 commits February 16, 2026 14:55
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
…erve_router_num_queued_requests'

Signed-off-by: Peter Nguyen <petern0408@gmail.com>
…same as monitoring.md (old description wasn't great)

Signed-off-by: Peter Nguyen <petern0408@gmail.com>
…ongoing_requests_at_replicas'

Signed-off-by: Peter Nguyen <petern0408@gmail.com>
@petern48 petern48 marked this pull request as ready for review February 17, 2026 15:57
@petern48 petern48 requested review from a team as code owners February 17, 2026 15:57
…e one

Signed-off-by: Peter Nguyen <petern0408@gmail.com>
@ray-gardener ray-gardener bot added the community-contribution Contributed by the community label Feb 17, 2026
@harshit-anyscale harshit-anyscale added the go add ONLY when ready to merge, run all tests label Feb 18, 2026
petern48 and others added 4 commits February 23, 2026 22:00
…java

Co-authored-by: harshit-anyscale <harshit@anyscale.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
@abrarsheikh
Copy link
Copy Markdown
Contributor

I think the most important detail we want to find out is the impact on runtime performance from this change. @harshit-anyscale once the PR is ready, could you help run a round of microbenchmarks on this PR to find out.

Signed-off-by: Peter Nguyen <petern0408@gmail.com>
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Mar 11, 2026
Signed-off-by: Peter Nguyen <petern0408@gmail.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Signed-off-by: Peter Nguyen <petern0408@gmail.com>
@github-actions github-actions bot removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Mar 19, 2026
@github-actions github-actions bot added the unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community go add ONLY when ready to merge, run all tests unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Serve] rename some prom metrics

3 participants