-
Notifications
You must be signed in to change notification settings - Fork 467
chore(ray): add metadata and entrypoint to ray job root span #14715
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
Conversation
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 reverts commit 48731a9.
Right now [the DJM intake expects Ray spans](https://github.com/DataDog/logs-backend/blob/79793e12095e033e3998ff6318416c5db0507907/domains/apm/apps/apm-processing/src/main/java/com/dd/logs/processing/processors/track/spans/JobSpansProcessor.java#L28) to have span type `producer` or `consumer`. It used to be `ray.producer` or `ray.consumer`, but after discussing last week we agreed to remove the `ray.` prefix to more closely match the spans produced by Ray's OpenTelemetry instrumentation. Our Ray integration [currently produces spans of three types](https://dd.datad0g.com/internal/events-ui/queries?group_by=type&index_name=djm-search&query_string=%40component%3Aray&query_type=aggregate&timerange=1755708134662-1756312934662l&track=trace): `serving`, `worker`, and `ml`. In this PR I am making it replace `serving` with `producer`, and `worker` and `ml` with `consumer` for now, just so the DJM intake recognizes that it needs to pick them up. For testing, I [opened this file in my local dd-source](https://github.com/DataDog/dd-source/blob/d67d0dd42507de7ab369761afa1b15e4652bed20/domains/data_science/apps/ray-cluster/image/aip-practice/aip-tracing/Dockerfile#L17) and replaced `dubloom/ray-integration` with `yakov.shapiro/MLOB-3768/update-span-type`, the name of this branch. I then followed [the steps from this comment on MLOB-3676](https://datadoghq.atlassian.net/browse/MLOB-3676?focusedCommentId=2568529). I verified that the type on the resulting spans [is now set to ray](https://dd.datad0g.com/internal/events-ui/queries?group_by=job_name&index_name=djm-search&query_string=%40component%3Aray&query_type=list&timerange=1756404208851-1756418608851&track=trace). ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
## Overview The change allows to capture host name which in conjunction with process ID will provide GPU utilization information. ## Checklist - [ ] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
dubloom
reviewed
Oct 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nits but we are almost good to go.
dubloom
approved these changes
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for addressing all my comments !
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
MLOB-3969 Add user metadata to root span tags
MLOB-3980 Tag the entry point on the root span
Testing
And running again with
DD_RAY_REDACT_ENTRYPOINT_PATHSset tofalseresults in an unredacted path in the entrypoint:Risks
None
Additional Notes
Do we need to support recreating these tags in
RaySpanManager._recreate_job_span?