Repository navigation
[Serve] Propagate tracing context in gRPC inter-deployment mode - #61089
Merged
Merged
Conversation
Signed-off-by: Peter Nguyen <[email protected]>
Signed-off-by: Peter Nguyen <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request correctly extends tracing context propagation to Ray Serve's gRPC inter-deployment mode. The change involves manually injecting the trace context into the request kwargs for gRPC calls, as they bypass the standard Ray actor RPC mechanism. The implementation is clean, uses existing helpers, and is well-commented. The corresponding test case is also correctly enabled by removing the skipif decorator, ensuring the fix is validated. The changes look good and I have no further suggestions.
harshit-anyscale
approved these changes
Feb 17, 2026
harshit-anyscale
left a comment
Contributor
There was a problem hiding this comment.
lgtm, thanks for contributing!
Contributor
Author
|
@abrarsheikh Would you want to take a quick look, given you authored the original commit? |
abrarsheikh
approved these changes
Feb 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Previously in ba5cd1c, trace context propagation was extended to Ray Serve. However, it missed the case for propagating the context through the gRPC path. #60209 applied a test skip for the gRPC case as a short-term solution for passing CI until support was properly extended to gRPC.
This PR extends context propagation support to gRPC by serializing the trace context into the request.
Related issues
Fixes #60223
Additional information
The implementation uses an existing Ray helper function that calls opentelemetry inject.
ray/python/ray/util/tracing/tracing_helper.py
Lines 165 to 170 in 8882b90