OpenTelemetry PHP

SanitizeCombinedHeadersPropagationGetter
in package
implements PropagationGetterInterface

FinalYes

Some servers concatenate multiple headers with ';' -- we need to replace these with ',' This is still a workaround and doesn't get around the problem fully, specifically it doesn't handle edge cases where the header has a trailing ';' or an empty trace state.

We also need to trim trailing separators from the header, found when a header is empty.

Table of Contents

Interfaces

PropagationGetterInterface

Constants

LIST_MEMBERS_SEPARATOR  = ','
SERVER_CONCAT_HEADERS_REGEX  = '/;(?=[^,=;]*=|$)/'
TRAILING_LEADING_SEPARATOR_REGEX  = '/^' . self::LIST_MEMBERS_SEPARATOR . '+|' . self::LIST_MEMBERS_SEPARATOR . '+$/'

Properties

$getter  : PropagationGetterInterface

Methods

__construct()  : mixed
get()  : string|null
Gets the value of a given key from a carrier.
keys()  : array<int, string>
Returns the list of all the keys in the carrier.

Constants

Properties

Methods

get()

Gets the value of a given key from a carrier.

public get(mixed $carrier, string $key) : string|null
Parameters
$carrier : mixed
$key : string
Return values
string|null

        
On this page

Search results