Extract Carrier • AI Agent SDK
extract_carrier: Return a propagation carrier extracted from inbound “carrier“.
extract_carrier
Method
</div>
This is a method of the GatewayTraceHook class in the protocols module.
Return a propagation carrier extracted from inbound `carrier`.
Reads W3C trace-context (`traceparent/tracestate) from an inbound header mapping and returns a normalized carrier suitable to pass as stage(..., parent_carrier=...), or None when no usable context is present. A no-op returning None` when no exporter is attached.
Signature
def extract_carrier(carrier: 'Mapping[str, str]') -> 'Optional[Mapping[str, str]]'Parameters
ParamField
'Mapping[str, str]'No description available.
Returns
ResponseField
'Optional[Mapping[str, str]]'The result of the operation.
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 6815