Flow PHP

Serializer

Interface for telemetry serializers.

Implementations convert Flow Telemetry batch objects to wire format for transmission to telemetry backends.

Signals carry their own Resource and InstrumentationScope, so serializers must group signals by Resource, then by Scope for the wire format.

Methods

serializeLogs()  : string
Serialize log records batch to wire format.
serializeMetrics()  : string
Serialize metrics batch to wire format.
serializeSpans()  : string
Serialize spans batch to wire format.

Methods

serializeLogs()

Serialize log records batch to wire format.

public serializeLogs(array<string|int, LogEntry$entries) : string
Parameters
$entries : array<string|int, LogEntry>

The log entries to serialize

Return values
string

Serialized payload ready for transmission

serializeMetrics()

Serialize metrics batch to wire format.

public serializeMetrics(array<string|int, Metric$metrics) : string
Parameters
$metrics : array<string|int, Metric>

The metrics to serialize

Return values
string

Serialized payload ready for transmission

serializeSpans()

Serialize spans batch to wire format.

public serializeSpans(array<string|int, Span$spans) : string
Parameters
$spans : array<string|int, Span>

The spans to serialize

Return values
string

Serialized payload ready for transmission


        
On this page

Search results