NullTracer
class NullTracer implements TracerInterface
This implementation of the TracerInterface is the null object implementation.
All methods are no ops. This tracer should be used if tracing is disabled.
Methods
Instrument a callable by creating a Span
Start a new Span. The start time is already set to the current time.
Add an attribute to the provided Span
Add an annotation to the provided Span
Add a link to the provided Span
Add an message event to the provided Span
Returns the current SpanContext
Whether or not this tracer is enabled.
Details
at line 40
mixed
inSpan(array $spanOptions, callable $callable, array $arguments = [])
Instrument a callable by creating a Span
at line 53
startSpan(array $spanOptions)
Start a new Span. The start time is already set to the current time.
The newly created span is not attached to the current context.
at line 65
Scope
withSpan(Span $span)
Attaches the provided span as the current span and returns a Scope object which must be closed.
at line 76
SpanData[]
spans()
Return the spans collected.
at line 90
addAttribute(string $attribute, string $value, array $options = [])
Add an attribute to the provided Span
at line 104
addAnnotation(string $description, array $options = [])
Add an annotation to the provided Span
at line 121
addLink(string $traceId, string $spanId, array $options = [])
Add a link to the provided Span
at line 140
addMessageEvent(string $type, string $id, array $options = [])
Add an message event to the provided Span
at line 149
SpanContext
spanContext()
Returns the current SpanContext
at line 159
bool
enabled()
Whether or not this tracer is enabled.