NoopSpanBuilder
in package
implements
SpanBuilderInterface
FinalYes
Table of Contents
Interfaces
- SpanBuilderInterface
- Obtained from a {@see TracerInterface} and used to construct a {@see SpanInterface}.
Properties
- $contextStorage : ContextStorageInterface
- $parentContext : ContextInterface|false|null
Methods
- __construct() : mixed
- addLink() : SpanBuilderInterface
- setAttribute() : SpanBuilderInterface
- setAttributes() : SpanBuilderInterface
- setParent() : SpanBuilderInterface
- Sets the parent `Context`.
- setSpanKind() : SpanBuilderInterface
- setStartTimestamp() : SpanBuilderInterface
- Sets an explicit start timestamp for the newly created {@see SpanInterface}.
- startSpan() : SpanInterface
- Starts and returns a new {@see SpanInterface}.
Properties
$contextStorage read-only
private
ContextStorageInterface
$contextStorage
$parentContext
private
ContextInterface|false|null
$parentContext
= null
Methods
__construct()
public
__construct(ContextStorageInterface $contextStorage) : mixed
Parameters
- $contextStorage : ContextStorageInterface
addLink()
public
addLink(SpanContextInterface $context[, iterable<string|int, mixed> $attributes = [] ]) : SpanBuilderInterface
Parameters
- $context : SpanContextInterface
- $attributes : iterable<string|int, mixed> = []
Return values
SpanBuilderInterfacesetAttribute()
public
setAttribute(string $key, mixed $value) : SpanBuilderInterface
Parameters
- $key : string
- $value : mixed
Return values
SpanBuilderInterfacesetAttributes()
public
setAttributes(iterable<string|int, mixed> $attributes) : SpanBuilderInterface
Parameters
- $attributes : iterable<string|int, mixed>
Return values
SpanBuilderInterfacesetParent()
Sets the parent `Context`.
public
setParent(ContextInterface|false|null $context) : SpanBuilderInterface
Parameters
- $context : ContextInterface|false|null
-
the parent context, null to use the current context, false to set no parent
Return values
SpanBuilderInterface —this span builder
setSpanKind()
public
setSpanKind(int $spanKind) : SpanBuilderInterface
Parameters
- $spanKind : int
Return values
SpanBuilderInterfacesetStartTimestamp()
Sets an explicit start timestamp for the newly created {@see SpanInterface}.
public
setStartTimestamp(int $timestampNanos) : SpanBuilderInterface
The provided $timestamp is assumed to be in nanoseconds.
Defaults to the timestamp when SpanBuilderInterface::startSpan was called if not explicitly set.
Parameters
- $timestampNanos : int
Return values
SpanBuilderInterfacestartSpan()
Starts and returns a new {@see SpanInterface}.
public
startSpan() : SpanInterface
The user MUST manually end the span by calling SpanInterface::end.
This method does NOT automatically install the span into the current context. The user is responsible for calling SpanInterface::activate when they wish to do so.