This repository was archived by the owner on Apr 23, 2021. It is now read-only.
Required context parameter considerations #8
Labels
documentation
Improvements or additions to documentation
One of the proposed API guidelines is that the context parameter be required, to avoid the context being inadvertently dropped.
There are a couple of considerations to think about here:
What a should a library do if they wish to integrate tracing but are not willing or able to make a breaking change yet? One solution would be to maintain both new and old versions of the method, one of which takes in the context, and deprecate the old context-free one to push users toward providing context. (Alternatively, the context parameter could be optional, but then we still have the issue of an inadvertently dropped context.)
Some libraries may have users/use cases where tracing isn't needed or wanted. How can library developers support users who don't already have a context around to pass in? @ktoso suggested this could be handled by providing some default "no context" value users can pass.
The text was updated successfully, but these errors were encountered: