opencensus-node icon indicating copy to clipboard operation
opencensus-node copied to clipboard

Option to disable async_hooks/cls

Open dicarlo2 opened this issue 5 years ago • 0 comments

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.

dicarlo2 avatar Aug 27 '19 02:08 dicarlo2