stage • AI Agent SDK
stage: Open a tracing scope for pipeline stage “name“.
stage
Method
</div>
This is a method of the GatewayTraceHook class in the protocols module.
Open a tracing scope for pipeline stage `name`.
Signature
def stage(name: str) -> 'AbstractContextManager[Any]'Parameters
ParamField
strThe stage name (see :data:GATEWAY_TRACE_STAGES), used as the span name.
Returns
ResponseField
'AbstractContextManager[Any]'A context manager delimiting the span’s lifetime.
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 6778