Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the possibility for disabling tracing #28

Open
jcchavezs opened this issue Nov 15, 2017 · 0 comments
Open

Adds the possibility for disabling tracing #28

jcchavezs opened this issue Nov 15, 2017 · 0 comments

Comments

@jcchavezs
Copy link
Contributor

jcchavezs commented Nov 15, 2017

From brave documentation:

If you are in a situation where you need to turn off tracing at runtime, invoke tracing.setNoop(true). This will turn any new spans into "noop" spans, and drop any data until tracing.setNoop(false) is invoked.

The main challenge here (as of PHP method visibility is per class and not per package as package don't exist) is to be able to change the state of the tracer through the tracing object and not being able to change it by itself.

Idea 1: Create a new tracer based on the old one (something like Tracer::withNoop(true|false)) and override it in the tracing. That will make it required to inject tracing in all dependencies that might require the tracer.

Idea 2: Create an object for holding the state of noop across Tracing, Tracer and Propagation.

What do you think? @cc5092 @beberlei @felixfbecker

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

No branches or pull requests

1 participant