-
Notifications
You must be signed in to change notification settings - Fork 469
fix(ray): increase ray instrumentation stability #15446
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
Merged
+1,777
−354
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1848ea3
feat(ray): better handle the absence of ray.init()
dubloom 8683e2e
fix tests
dubloom bb79370
fix service names
dubloom 96d9186
add denylist for task submission
dubloom 50301c6
fix a potential issue
dubloom a195e82
Merge branch 'main' into dubloom/ddtrace-run-ray
dubloom 3c8f4c8
fix snapshots
dubloom 2aac010
add releasenote
dubloom 9d673c1
deactivate cross_language tasks
dubloom 67966c8
Merge branch 'main' into dubloom/ddtrace-run-ray
dubloom 0c753c2
Merge branch 'main' into dubloom/ddtrace-run-ray
dubloom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/fix-ray-without-init-5e21fcf5117afd0c.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| fixes: | ||
| - | | ||
| ray: This fix resolves an issue where Ray jobs that did not explicitly call ``ray.init()`` at the top of their scripts | ||
| were not properly instrumented, resulting in incomplete traces. | ||
| To ensure full tracing capabilities, use ``ddtrace-run`` when starting your Ray cluster: | ||
| ``DD_PATCH_MODULES="ray:true,aiohttp:false,grpc:false,requests:false" ddtrace-run ray start --head``. | ||
dubloom marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import ray | ||
|
|
||
|
|
||
| @ray.remote | ||
| class Counter: | ||
| def __init__(self): | ||
| self.value = 0 | ||
|
|
||
| def increment(self): | ||
| self.value += 1 | ||
| return self.value | ||
|
|
||
| def get_value(self): | ||
| return self.value | ||
|
|
||
|
|
||
| def main(): | ||
| counter = Counter.remote() | ||
| result = ray.get(counter.increment.remote()) | ||
| assert result == 1, f"Expected 1, got {result}" | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import ray | ||
|
|
||
|
|
||
| @ray.remote | ||
| def add_one(x): | ||
| return x + 1 | ||
|
|
||
|
|
||
| def main(): | ||
| futures_add_one = add_one.remote(0) | ||
| result = ray.get(futures_add_one) | ||
| assert result == 1, f"Unexpected results: {result}" | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.