← [ ABORT TO HUD ]
SEQ. 1

OTel Tracing & Semantic Guardrails

📊 Observability, Evals & Guardrail Harnesses⏱ 20 min⭐ 150 BASE XP⌨ HANDS-ON LAB

Production Telemetry & Distributed Tracing for Agent Workflows

Unlike traditional web services where operational health is adequately captured by HTTP status codes and CPU utilization metrics, generative AI architectures require semantic observability: tracking token consumption, prompt drift, guardrail interventions, and reasoning trajectories across asynchronous tool pipelines.

The Three Pillars of AI Observability
  • OpenInference Semantic Conventions: Standardizes span attributes for LLM calls (e.g., llm.model_name, llm.token_count.prompt, llm.token_count.completion, llm.tools) so traces can be visualized seamlessly in Jaeger, Grafana Tempo, or Arize Phoenix.
  • NeMo Guardrails & Colang 2.0: Programmable safety boundaries that intercept prompts prior to model invocation (Input Rails), steer conversation state (Dialog Rails), and sanitize output responses (Output Rails).
  • Automated Red-Teaming Evals: Continuous testing pipelines executing adversarial prompt injection, jailbreak attempts, and PII exfiltration vectors to evaluate policy resilience.
# OpenInference Tracing Instrumentation with OpenTelemetry
from opentelemetry import trace
from openinference.semconv.trace import SpanAttributes

tracer = trace.get_tracer("enterprise-agent-harness")

with tracer.start_as_current_span("agent_reasoning_step") as span:
    span.set_attribute(SpanAttributes.LLM_MODEL_NAME, "nemotron-4-340b-instruct")
    span.set_attribute(SpanAttributes.LLM_TOKEN_COUNT_PROMPT, 142)
    span.set_attribute(SpanAttributes.LLM_TOKEN_COUNT_COMPLETION, 310)
    span.set_attribute("guardrail.status", "VERIFIED_SAFE")
    # Execute inference workflow...
⌨ HANDS-ON LABInspect OpenInference Spans & Guardrails
⭐ +175 XP

Trace an LLM execution span with OpenInference attributes and trigger a safety guardrail intervention.

1Export active OpenTelemetry trace for current inference request.
2Simulate a prompt injection attack and verify guardrail block.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 2 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 2
Which open standard is widely adopted for tracing LLM execution spans across distributed systems?
Windows Event Viewer
Syslog only
OpenTelemetry (OTel) with OpenInference semantic conventions
Simple print() statements