forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Record zipkin traces for remote file operations (pantsbuild#8124)
### Problem We want to enable more accurate troubleshooting of dependency issues by recording the time taken by remote file operations in the zipkin trace produced by pants. ### Solution On the python side, pass the session down to the rust ffi so that mutations to the workunit_store contained in that session get propagated. On the rust side, take the session ptr from the ffi interface and propagate the workunit_store down to the following functions in the remote store: * ByteStore::store_bytes, * ByteStore::load_bytes_with, and * ByteStore::list_missing_digests. In each of these functions, record a `WorkUnit` for the work that is done and add it to the `WorkUnitStore`. ### Result This is enough to populate the zipkin trace as the python side is already converting the `engine`'s `WorkUnit`'s into zipkin spans and passing them to the zipkin server through `py_zipkin`. Still TODO (in future PRs): * Decide how to use the workunit_store to extract relevant information in fs_util (for now, it's simply passed down and ignored) * Decide if we need to use the WorkUnitStore in src/node.rs and in process_execution/cache.rs. * Create an integration test for this change (currently, it was manually verified that each of the three functions appear in the zipkin trace when running a pants command remotely)
- Loading branch information
1 parent
cdb2207
commit 2108156
Showing
16 changed files
with
754 additions
and
358 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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
Oops, something went wrong.