-
Notifications
You must be signed in to change notification settings - Fork 317
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
Instrument the child_process module #920
Comments
Could you describe your use case? My worry is that |
Hi @rochdev, There are plenty of npm libraries that just wrap binaries which they call using I think that this can be a fairly common use case. |
Does this module always call |
In 99% of the cases, it does. Just for my own understanding, by trying to avoid this long spans, are you trying to avoid some issue with how this library gathers the information or just trying to avoid the users to shoot their own feet? |
Is the 1% where it's a cron job interesting for you? Or would the 99% where something is waiting be enough?
In this case it's really to avoid having an auto-instrumentation that results in never-ending traces by default. If you have use cases without a parent that you are interested in, I could always add a configuration option on the plugin to configure that behavior. But I want to make sure that the default won't break tracing. |
Hi, Sorry I totally missed your last question. Ideally one always wants 100% visibility. Although 99% visibility is better than the current 0%. I think that |
That makes sense. This is not in our plans short-term however, so for your use case specifically are you (or a library you own) calling For example: tracer.trace('child_process.exec', (span, cb) => {
child_process.exec('echo "hello"', err => {
cb(err)
// your code
})
}) Does that work for your use case at least for now? |
The manual instrumentation option was given here, and I don't think we're likely to instrument |
Would it be possible to instrument the
child_process
module so time spent on launching external programs and errors on those are included in the traces?The text was updated successfully, but these errors were encountered: