Skip to main content

inject_context

Method
This is a method of the GatewayTraceHook class in the protocols module.
Write the active span context into carrier as W3C headers. Called at an egress boundary (LLM / MCP / HTTP-tool request) so the downstream service’s spans nest under the current agent turn. A no-op when no exporter is attached, leaving carrier untouched.

Signature

Parameters

'MutableMapping[str, str]'
required
No description available.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 5228

Context Concept

Context Management

Context Strategies