function SanitizeCombinedHeadersPropagationGetter::get
Overrides PropagationGetterInterface::get
File
-
vendor/
open-telemetry/ context/ Propagation/ SanitizeCombinedHeadersPropagationGetter.php, line 30
Class
- SanitizeCombinedHeadersPropagationGetter
- 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…
Namespace
OpenTelemetry\Context\PropagationCode
public function get($carrier, string $key) : ?string {
$value = $this->getter
->get($carrier, $key);
if ($value === null) {
return null;
}
return preg_replace([
self::SERVER_CONCAT_HEADERS_REGEX,
self::TRAILING_LEADING_SEPARATOR_REGEX,
], [
self::LIST_MEMBERS_SEPARATOR,
], $value);
}