OpenTelemetry PHP

CloudTraceFormatter
in package

FinalYes

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

The current format of the header is <trace-id>[/<span-id>][;o=<options>]. The options are a bitmask of options. Currently the only option is the least significant bit which signals whether the request was traced or not (1 = traced, 0 = not traced).

Table of Contents

Constants

CONTEXT_HEADER_FORMAT  = '/([0-9a-fA-F]{32})(?:\/(\d+))?(?:;o=(\d+))?/'

Methods

deserialize()  : SpanContextInterface
Generate a SpanContext object from the Trace Context header
serialize()  : string
Convert a SpanContextInterface to header string

Constants

CONTEXT_HEADER_FORMAT

public mixed CONTEXT_HEADER_FORMAT = '/([0-9a-fA-F]{32})(?:\/(\d+))?(?:;o=(\d+))?/'

Methods


        
On this page

Search results