class TraceContextFormatter implements FormatterInterface

This format using a human readable string encoding to propagate SpanContext.

See specification for the definition.

Constants

CONTEXT_HEADER_FORMAT

VERSION_0_FORMAT

Methods

deserialize(string $header)

Generate a SpanContext object from the Trace Context header

string
serialize(SpanContext $context)

Convert a SpanContext to header string. Uses version 0.

Details

at line 38
SpanContext deserialize(string $header)

Generate a SpanContext object from the Trace Context header

Parameters

string $header

Return Value

SpanContext

at line 56
string serialize(SpanContext $context)

Convert a SpanContext to header string. Uses version 0.

Parameters

SpanContext $context

Return Value

string