Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Separate CLS from Tracer and make it optional #462

Closed
hekike opened this issue Apr 2, 2019 · 3 comments
Closed

Separate CLS from Tracer and make it optional #462

hekike opened this issue Apr 2, 2019 · 3 comments

Comments

@hekike
Copy link
Contributor

hekike commented Apr 2, 2019

Is your feature request related to a problem? Please describe.

Continues local storage has an overhead which maybe makes sense in applications where the developer doesn't control the instrumentation and it should happen automatically but is unnecessary in services with explicit instrumentation.

Read more about common issues with CLS in othiym23/node-continuation-local-storage#59.

Describe the solution you'd like

My proposal would be to remove CLS usage from the CoreTracer class and create a new class CoreTracerCLS which extends the CoreTracer and enhances it with CLS. Then we could expose the CoreTracer and keep CoreTracerCLS the default Tracer to avoid breaking change.

Describe alternatives you've considered

A bigger change would be to keep the Core OpenCensus Node module explicit and completely CLS and monkey patching free and create a new module that does the automatic instrumentation via the pure core module with CLS and require hooks.

Additional context

This proposal is slightly related to these changes which give more control to the developer:

I'm happy to help with the implementation and open a PR.

This Issue was created based on our conversation with @bogdandrutu, @mayurkale22, @kjin, @ofrobots, and @kenashcraft

@mayurkale22
Copy link
Member

Thanks for filling the issue, feel free to shoot the PR.

@mayurkale22
Copy link
Member

@hekike Can we close this one via #484?

@hekike
Copy link
Contributor Author

hekike commented May 17, 2019

Yes, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants