[Server][Client] Bridge W3C trace context between HTTP headers and _meta (SEP-414) (#473)
RequestMeta::parseTraceContext() now falls back to the native traceparent/ tracestate/baggage HTTP headers when _meta carries none, and HeaderFactory mirrors an application-set _meta trace context onto those same headers on outbound requests. _meta wins when both are present.
This commit is contained in:
parent
1e9520e731
commit
d59950f1ac
1 changed files with 134 additions and 10 deletions
|
|
@ -197,7 +197,7 @@ final class StatelessProtocol
|
|||
}
|
||||
|
||||
try {
|
||||
$meta = RequestMeta::fromParams($params);
|
||||
$meta = RequestMeta::fromParams($params, $headers);
|
||||
} catch (MissingRequestMetaException $e) {
|
||||
return StatelessResult::error(Error::forInvalidParams($e->getMessage(), $id), 400);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue