opencensus-node
opencensus-node copied to clipboard
Option to disable async_hooks/cls
NB: Before opening a feature request against this repo, consider whether the feature should/could be implemented in other the OpenCensus libraries in other languages. If so, please open an issue on opencensus-specs first.
Is your feature request related to a problem? Please describe. Basically same comment as https://github.com/census-instrumentation/opencensus-node/issues/462.
Describe the solution you'd like CLS to be optional.
Describe alternatives you've considered Nada.
Additional context
https://github.com/census-instrumentation/opencensus-node/blob/2ae76c305defedbebdfd15a01ee5956bd93bc82a/packages/opencensus-core/src/internal/cls-ah.ts#L35 means that async hooks are initialized regardless of whether or not the tracer implementation that uses them is imported by the user. Please move the enable
call to outside of module scope.