OpenTelemetry PHP

Span
in package
implements SpanInterface

AbstractYes

Table of Contents

Interfaces

SpanInterface
Represents a value that can be stored within {@see ContextInterface}.

Properties

$invalidSpan  : self|null

Methods

activate()  : ScopeInterface
Adds `$this` to the {@see Context::getCurrent() current context} and makes the new {@see Context} the current context.
fromContext()  : SpanInterface
Returns the {@see SpanInterface} from the provided *$context*, falling back on {@see SpanInterface::getInvalid()} if there is no span in the provided context.
getCurrent()  : SpanInterface
Returns the current {@see SpanInterface} from the current {@see ContextInterface}, falling back on {@see SpanInterface::getEmpty()} if there is no span in the current context.
getInvalid()  : SpanInterface
Returns an invalid {@see SpanInterface} that is used when tracing is disabled, such s when there is no available SDK.
storeInContext()  : ContextInterface
Returns a new {@see ContextInterface} created by setting `$this` into the provided [@see ContextInterface}.
wrap()  : SpanInterface
Returns a non-recording {@see SpanInterface} that hold the provided *$spanContext* but has no functionality.

Properties

$invalidSpan

private static self|null $invalidSpan = null

Methods

activate()

Adds `$this` to the {@see Context::getCurrent() current context} and makes the new {@see Context} the current context.

public final activate() : ScopeInterface
Tags
inheritDoc
Return values
ScopeInterface

fromContext()

Returns the {@see SpanInterface} from the provided *$context*, falling back on {@see SpanInterface::getInvalid()} if there is no span in the provided context.

public final static fromContext(ContextInterface $context) : SpanInterface
Parameters
$context : ContextInterface
Tags
inheritDoc
Return values
SpanInterface

getCurrent()

Returns the current {@see SpanInterface} from the current {@see ContextInterface}, falling back on {@see SpanInterface::getEmpty()} if there is no span in the current context.

public final static getCurrent() : SpanInterface
Tags
inheritDoc
Return values
SpanInterface

getInvalid()

Returns an invalid {@see SpanInterface} that is used when tracing is disabled, such s when there is no available SDK.

public final static getInvalid() : SpanInterface
Tags
inheritDoc
Return values
SpanInterface

        
On this page

Search results