feat: option to report or kill stalled goroutines
robertrossmann opened this issue · 1 comments
robertrossmann commented
Currently when a goroutine runs indefinitely this package does not really care. Perhaps it would be good to add a configuration option, MaxDuration
, which when set, would trigger a hook (.OnMaxDurationExceeded(ctx context.Context, meta Meta)
).
Optionally, we could try to come up with some mechanism to allow the hook to also kill the goroutine.
robertrossmann commented
Implemented in #2 . No goroutine killing after exceeding the threshold for now, just reporting.