OpenTelemetry PHP

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

Methods

setStartTimestamp()

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
SpanBuilderInterface

startSpan()

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.

Return values
SpanInterface

        
On this page

Search results