Nexus API Reference

SpanContext
in package

Read onlyYes
FinalYes
Tags
psalm-api
psalm-immutable

Minimal, transport-agnostic identity of a span for context propagation.

traceId is a 32-char lowercase hex string, spanId a 16-char lowercase hex string, traceFlags the W3C trace-flags byte (only bit 0, "sampled", is used).

Table of Contents

Properties

$remote  : bool
$spanId  : string
$traceFlags  : int
$traceId  : string
$traceState  : string

Methods

__construct()  : mixed
invalid()  : self
An unset/invalid context (all-zero ids).
isValid()  : bool
True when both ids are non-zero (a real, propagatable context).

Properties

Methods

__construct()

public __construct(string $traceId, string $spanId, int $traceFlags, bool $remote[, string $traceState = '' ]) : mixed
Parameters
$traceId : string
$spanId : string
$traceFlags : int
$remote : bool
$traceState : string = ''

invalid()

An unset/invalid context (all-zero ids).

public static invalid() : self
Return values
self

isValid()

True when both ids are non-zero (a real, propagatable context).

public isValid() : bool
Return values
bool

        
On this page

Search results