Use this guide when you want NeMo Relay to identify one agent run, request, workflow, or operation before you instrument individual tool and LLM calls.
You will create an active scope, emit named mark events inside that scope, and validate that subscribers can observe the lifecycle. The result is a small trace boundary that later tool calls, LLM calls, middleware, and exporters can attach to.
Scopes give emitted work ownership. Marks record point-in-time checkpoints inside that ownership boundary.
Complete one binding Quick Start guide first:
You should know which application boundary should own the trace. Common scope boundaries include:
Follow this sequence to keep framework work attached to the expected runtime context.
The examples below create one agent-run scope and emit two marks.
Use marks for checkpoints that should appear in the event stream but do not wrap a callback:
Use a nested scope instead of a mark when the work has a meaningful start and end boundary, child work, or a duration that matters.
Check that the subscriber prints:
agent-runplanning-startedplanning-finishedagent-runNative subscribers are delivered asynchronously. Flush subscribers before
validating printed or captured output. In Node.js, also wait one event-loop tick
after flushSubscribers() so queued JavaScript callbacks can run.
If marks appear outside the intended trace, pass the active scope handle explicitly or make sure the mark is emitted while the scope is active.
Use this checklist before running the pattern in production traffic.
data, metadata, input, and output payloads.Use these links to continue from this workflow into the next related task.