Use context.WithTimeoutCause & context.WithCancelCause instead of context.WithTimeout & context.WithCancel #11280
Labels
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
I think we should start using the With*Cause variants of these functions as they allow adding additional context. This should lead to better messages than the standard "context canceled" when a context is canceled.
I took a look at our code base and we have roughly 20 context.WithCancel & 20 context.WithTimeout so it shouldn't be a lot of work to audit all of them and see if we want to use the With*Cause funcs instead
The text was updated successfully, but these errors were encountered: