Flow PHP

Context

FinalYes

Trace id is derived from the active span, never stored.

Properties

$activeSpan  : SpanContext|null
$baggage  : Baggage
$suppressed  : bool

Methods

__construct()  : mixed
activeSpan()  : SpanContext|null
activeSpanId()  : SpanId|null
fromArray()  : self
isRootContext()  : bool
isTracingSuppressed()  : bool
Whether tracing is suppressed within this context: spans are created non-recording (never sampled, never exported). Metrics and logs are unaffected, matching OpenTelemetry's tracing-scoped suppression.
normalize()  : array{activeSpan: null|array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags: array{byte: int}, traceState: array{entries: array}}, baggage: array{entries: array}}
root()  : self
traceId()  : TraceId|null
withActiveSpan()  : self
withBaggage()  : self
withoutActiveSpan()  : self
withoutSuppressedTracing()  : self
withSuppressedTracing()  : self

Properties

$suppressed read-only

public bool $suppressed = false

Methods

fromArray()

public static fromArray(array{activeSpan: null|array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags?: array{byte: int}, traceState?: array{entries: array}}, baggage: array{entries: array}} $data) : self
Parameters
$data : array{activeSpan: null|array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags?: array{byte: int}, traceState?: array{entries: array}}, baggage: array{entries: array}}
Return values
self

isRootContext()

public isRootContext() : bool
Return values
bool

isTracingSuppressed()

Whether tracing is suppressed within this context: spans are created non-recording (never sampled, never exported). Metrics and logs are unaffected, matching OpenTelemetry's tracing-scoped suppression.

public isTracingSuppressed() : bool
Return values
bool

normalize()

public normalize() : array{activeSpan: null|array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags: array{byte: int}, traceState: array{entries: array}}, baggage: array{entries: array}}
Return values
array{activeSpan: null|array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags: array{byte: int}, traceState: array{entries: array}}, baggage: array{entries: array}}

root()

public static root() : self
Return values
self

withBaggage()

public withBaggage(Baggage $baggage) : self
Parameters
$baggage : Baggage
Return values
self

withoutActiveSpan()

public withoutActiveSpan() : self
Return values
self

withoutSuppressedTracing()

public withoutSuppressedTracing() : self
Return values
self

withSuppressedTracing()

public withSuppressedTracing() : self
Return values
self
On this page

Search results