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

python
def stage(name: str) -> 'AbstractContextManager[Any]'

Parameters

ParamField str

The 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 GitHub

praisonaiagents/gateway/protocols.py at line 6778