NullGatewayTraceHook
Defined in the protocols module.AI Agent Zero-cost no-op :class:
GatewayTraceHook used when tracing is disabled.
Every stage call returns a lightweight, argument-ignoring null context
manager (one small allocation per call), so firing the seam adds negligible
overhead on the hot path. This is the default a gateway uses until an
exporter plugin (e.g. the OTel/OTLP plugin in praisonai-plugins) is
supplied.
Methods
stage()
Return a no-op context manager, ignoring all arguments.
inject_context()
No-op: leave
carrier untouched when tracing is disabled.extract_carrier()
No-op: no parent context to continue when tracing is disabled.
Source
View on GitHub
praisonaiagents/gateway/protocols.py at line 5553
