What problem does it solve?
Concurrent applications using NeMo Relay instrumentation often suffer from observability cross-contamination: events from different requests appear under one root UUID, scope-local middleware leaks across requests, and worker threads run without the expected active scope. This Skill teaches agents how to give each independent request, agent, or workflow its own scope stack with correct ancestry propagation.
Core Features & Use Cases
- Per-Language Isolation Patterns: Python task-local stacks via
get_scope_stack() and contextvars, Rust helpers like create_scope_stack() and set_thread_scope_stack(...), Go NewScopeStack() with ScopeStack.Run(...), and Node.js createScopeStack() with setThreadScopeStack(...).
- Scope Model Guidance: Explains the root scope, parent-child scope trees, standard scope types (Agent, Function, Tool, Llm, Retriever, and more), and scope-local registration lifetimes.
- Failure Diagnosis: Identifies common failures such as shared mutable stacks across goroutines, middleware leaking between agents, and lost stacks across async or worker boundaries.
- Use Case: A Node.js multi-agent orchestrator where five agents run in one process and tool-call events bleed into other agents' traces gets fixed by assigning each agent its own scope stack.
Quick Start
Ask your agent to set up isolated NeMo Relay scope stacks for your concurrent Python, Go, Rust, or Node.js application so each request or agent gets independent ancestry.