You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
From brave documentation:
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 thetracing
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 injecttracing
in all dependencies that might require thetracer
.Idea 2: Create an object for holding the state of
noop
acrossTracing
,Tracer
andPropagation
.What do you think? @cc5092 @beberlei @felixfbecker
The text was updated successfully, but these errors were encountered: