You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Behavior to document (all gated on telemetry.enabled: true):
Env vars for subprocesses: the Bash tool (and therefore skill scripts) and headless subagents receive TRACEPARENT/TRACESTATE (W3C Trace Context, parented on the current execute_tool span) and BAGGAGE (W3C Baggage: infer.session.id, infer.tool.call.id). Nothing is set when telemetry is disabled.
Span reporting is standard OTLP, chosen automatically:
telemetry.otlp.endpoint configured: the endpoint and headers are passed through to the child env (OTEL_EXPORTER_OTLP_ENDPOINT/OTEL_EXPORTER_OTLP_HEADERS) so child spans stitch in the remote backend.
No endpoint (the default): the CLI runs an ephemeral localhost OTLP/HTTP receiver per session and points children at it; received spans are persisted into the local per-session trace store and appear in infer traces / /traces nested under the tool span.
Any OTel-instrumented tool works with zero custom code. Example with otel-cli inside a Bash tool call:
otel-cli exec --name "go test" -- go test ./...
The resulting span shows up as a child of execute_tool Bash in infer traces.
Subagents: infer agent honors an inherited TRACEPARENT, so a subagent session nests under the caller's execute_tool Agent span - one cross-process trace:
Remote A2A agents: outbound A2A requests carry traceparent/tracestate/baggage HTTP headers. Context-out only: remote spans stitch via a shared collector, not the local store.
Limitations worth stating: interactive (tmux-pane) subagents are not stitched; detached background shells that outlive the CLI lose late spans.
Affected pages:
Telemetry/observability page: the propagation contract, the env vars, the local-first/remote-optional sink selection, the otel-cli and OTel SDK examples.
The telemetry docs document TRACEPARENT/TRACESTATE/BAGGAGE propagation to subprocesses and the OTLP sink selection (configured endpoint passthrough vs local ephemeral receiver).
An otel-cli example and an OTel SDK note show third-party spans landing in infer traces.
Subagent trace nesting and the A2A HTTP header propagation are documented, including the shared-collector requirement for remote spans.
Summary
inference-gateway/cli#909 (closes inference-gateway/cli#904) makes subprocess and remote-agent tracing cooperative and open-standard. The propagation contract is user-facing and undocumented.
Behavior to document (all gated on
telemetry.enabled: true):TRACEPARENT/TRACESTATE(W3C Trace Context, parented on the currentexecute_toolspan) andBAGGAGE(W3C Baggage:infer.session.id,infer.tool.call.id). Nothing is set when telemetry is disabled.telemetry.otlp.endpointconfigured: the endpoint and headers are passed through to the child env (OTEL_EXPORTER_OTLP_ENDPOINT/OTEL_EXPORTER_OTLP_HEADERS) so child spans stitch in the remote backend.infer traces//tracesnested under the tool span.The resulting span shows up as a child of
execute_tool Bashininfer traces.infer agenthonors an inheritedTRACEPARENT, so a subagent session nests under the caller'sexecute_tool Agentspan - one cross-process trace:traceparent/tracestate/baggageHTTP headers. Context-out only: remote spans stitch via a shared collector, not the local store.Affected pages:
infer tracesreference (see [DOCS] Document infer traces command and /traces shortcut #390): mention that ingested child spans appear in the tree.Source: inference-gateway/cli#909, inference-gateway/cli#904. Related: #390.
Acceptance Criteria
TRACEPARENT/TRACESTATE/BAGGAGEpropagation to subprocesses and the OTLP sink selection (configured endpoint passthrough vs local ephemeral receiver).infer traces.