Flow PHP

Signals

Read onlyYes
FinalYes

A typed collection of telemetry items for one signal type.

Construct via the static factories (self::logs(), self::metrics(), self::traces()). Read items via the matching accessor (self::allLogs()/self::allMetrics()/self::allSpans()); each accessor throws on type mismatch so the caller stays inside the correct match arm.

Properties

$type  : SignalType

Methods

allLogs()  : array<string|int, LogEntry>
Read the log entries from a logs signal collection.
allMetrics()  : array<string|int, Metric>
Read the metrics from a metrics signal collection.
allSpans()  : array<string|int, Span>
Read the spans from a traces signal collection.
count()  : int
isEmpty()  : bool
logs()  : self
Construct a logs signal collection.
metrics()  : self
Construct a metrics signal collection.
traces()  : self
Construct a traces signal collection.

Properties

Methods

allLogs()

Read the log entries from a logs signal collection.

public allLogs() : array<string|int, LogEntry>
Tags
throws
RuntimeException

if the signal does not carry logs

Return values
array<string|int, LogEntry>

allMetrics()

Read the metrics from a metrics signal collection.

public allMetrics() : array<string|int, Metric>
Tags
throws
RuntimeException

if the signal does not carry metrics

Return values
array<string|int, Metric>

allSpans()

Read the spans from a traces signal collection.

public allSpans() : array<string|int, Span>
Tags
throws
RuntimeException

if the signal does not carry spans

Return values
array<string|int, Span>

count()

public count() : int
Return values
int

isEmpty()

public isEmpty() : bool
Return values
bool

logs()

Construct a logs signal collection.

public static logs(array<string|int, LogEntry$entries) : self
Parameters
$entries : array<string|int, LogEntry>
Return values
self

metrics()

Construct a metrics signal collection.

public static metrics(array<string|int, Metric$metrics) : self
Parameters
$metrics : array<string|int, Metric>
Return values
self

traces()

Construct a traces signal collection.

public static traces(array<string|int, Span$spans) : self
Parameters
$spans : array<string|int, Span>
Return values
self
On this page

Search results