Skip to content

Conversation

jayasi
Copy link
Contributor

@jayasi jayasi commented Aug 15, 2025

Summary:
Introducing a client context, which currently only contains a trace id, which can be used to connect events on the client and worker side. The trace id will be logged to scuba, and is saved as an env var on the process.

get_trace_id_or_create_new is first called when we initialize the rust bindings and the trace_id itself is first assigned to be the same as the execution id.

Then, as part of the alloc we also pass this trace id along. For RemoteProcessAllocator, the Allocate message will take the client context, and on receiving it, set it in the AllocSpec before allocating the new processes.

The ProcessAlloc will set the env var after reading the trace_id from the match_labels of the AllocSpec. It is only set when the client has set it and passed it with the RemoteAlloc. It will default to "".

Differential Revision: D79537187

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 15, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79537187

…ytorch#897)

Summary:

Introducing a client context, which currently only contains a trace id, which can be used to connect events on the client and worker side. The trace id will be logged to scuba, and is saved as an env var on the process. 

get_trace_id_or_create_new is first called when we initialize the rust bindings and the trace_id itself is first assigned to be the same as the execution id. 

Then, as part of the alloc we also pass this trace id along. For RemoteProcessAllocator, the Allocate message will take the client context, and on receiving it, set it in the AllocSpec before allocating the new processes. 

The ProcessAlloc will set the env var after reading the trace_id from the match_labels of the AllocSpec. It is only set when the client has set it and passed it with the RemoteAlloc. It will default to "".

Reviewed By: eliothedeman, vidhyav

Differential Revision: D79537187
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79537187

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b1467fd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants