The PHP SDK exposes logs, metrics, trace ids, and spans as protocol messages.
Pass TraceId to invokeTool() or rely on the client to generate one.
Runtime emissions preserve the trace id.
Inject a PSR-3 logger into ARCPClient or ARCPRuntime.
Use TraceSpan for explicit spans and envelope metadata for trace ids.
Emit spans from tools around external calls or long-running phases.
Forward trace_id when delegating to preserve the span tree.
You can still observe logs and metrics through subscriptions and the event log.
Heartbeats prove liveness; spans describe work.
Log envelope ids, session ids, job ids, and trace ids in host logs.
Sampling is host-defined. Do not sample away protocol errors or terminal job states.
See samples/capability_negotiation/ and samples/reasoning_streams/.