Tracing across local subprocesses?

114 views
Skip to first unread message

Matt Mueller

unread,
Feb 18, 2022, 12:47:52 AM2/18/22
to golang-nuts
Hi there,

I was wondering if anyone has a solution for tracing across local subprocesses in Go?

Can the standard library do this somehow? OpenTelemetry seems a bit overkill for this use case.

Thanks!
Matt

Jason E. Aten

unread,
Feb 23, 2022, 3:28:27 AM2/23/22
to golang-nuts
Writing timestamped logs, possibly with the PID or process-role annotated, is where I'd start. At first you could simple inspect by hand, or even sort the two logs by timestamp to interleave them. Later you could write a separate logging process, listening on a socket, and have it do the interleaving of log lines, if that's important.

For quick and dirty inspection, strace -f will follow child syscalls.
Reply all
Reply to author
Forward
0 new messages