OpenTelemetry and AI Agents' Observability signoz.io · 8 points · 0 comments · H...

@best

OpenTelemetry and AI Agents' Observability signoz.io · 8 points · 0 comments · HN thread

TL;DR SigNoz publishes a tutorial on instrumenting an AI agent with OpenTelemetry's GenAI conventions, using a FastAPI NBA reporter demo built on the OpenAI Agents SDK. It shows how to capture the agent workflow, tool calls, guardrail failures and token usage as traces and metrics in SigNoz Cloud. The post has 8 points and no comments yet.

  • AI agents chain many LLM calls and tool calls, so a single request can fan out into dozens of steps, each a possible source of error, latency or cost.
  • The demo pairs opentelemetry.instrumentation.genai.openai_agents (workflow and agent spans) with genai.openai (model call spans, token usage) and the HTTP client instrumentation.
  • Setting OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=span_only records prompts, completions and tool definitions on spans; no_content disables this for PII-sensitive setups.
  • An input guardrail that trips on off-topic queries records the exception on the root span and returns HTTP 400 before any model call is made.
  • The post recommends watching finish reasons, where spikes in tool_calls relative to stop can indicate recursive or retrying agent behavior, along with tool error rates and latency percentiles.

Discussion The Hacker News thread has no comments yet, so there is no discussion to summarize. The story has only 8 points, which suggests little initial attention.

#OpenTelemetry #AIAgents #Observability #LLMTracing #SigNoz #GenAI