4 ms·
How would one log that? In our case the bug was in a goroutine started by a third-party library, so we don't have control over when it starts or exits. I don't
by atombender 3y ago
How would one log that? In our case the bug was in a goroutine started by a third-party library, so we don't have control over when it starts or exits.
I don't think Goleak would have helped here, because I believe it doesn't support concurrency. It's really designed to run in tests, not in production. It parses and searches stack traces, so it's not going to be performant.
- physicles 3y agoI guess you’d need to fork the third-party library (or, if you can build locally, just yolo and chmod +w) and inject something to track those goroutine metrics. But I suppose by the time you’re doing that, you already know where the problem is.