Skip to content
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

New Crate: Subprocess tracing #190

Open
yaahc opened this issue Jul 16, 2019 · 1 comment
Open

New Crate: Subprocess tracing #190

yaahc opened this issue Jul 16, 2019 · 1 comment
Labels
kind/rfc A request for comments to discuss future changes needs/design Additional design discussion is required.

Comments

@yaahc
Copy link
Collaborator

yaahc commented Jul 16, 2019

Feature Request

This is a feature I'd like to implement for fun. The idea is basically to write a crate that has two parts.

  1. A wrapper for std::process that lets us spawn processes with extra env variables set transparently that correspond to the span the subprocess is a child of.
  2. An init function that can be run on startup of the subprocess to read said env variables and correctly configure its tracing stuff (subscriber?) so that It

Crates

None, new crate, tracing-subprocess?

Motivation

This was inspired by cargo fix it runs itself as a wrapper around rustc and reinvokes itself as a subprocess as part of the logic for fix. I thought it would be cool if we could trace across this subprocess boundary.

Proposal

I am looking for guidance on how to implement this.

Alternatives

Alternatively we could not, or we could implement general network based logging for cross process tracing, or maybe do it in such a way where the medium of communication is abstracted so it becomes trivial to extend, who knows!

@hawkw hawkw added kind/rfc A request for comments to discuss future changes needs/design Additional design discussion is required. labels Aug 2, 2019
@jamesmunns
Copy link
Contributor

Mentioning it here, but I'm taking a look at making a more explicit "structured report types" for Serde. This might be an interesting way of handling inter-process comms? The example I give here is for going from an MCU -> a desktop PC, but if tracing had a way of "importing" these reports, it'd work the same way process -> process as my MCU example.

#275 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/rfc A request for comments to discuss future changes needs/design Additional design discussion is required.
Projects
None yet
Development

No branches or pull requests

3 participants