Skip to content

Adds the possibility for disabling tracing #28

@jcchavezs

Description

@jcchavezs

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions