<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How I Built a Fully Observable AI Agent with SigNoz and OpenTelemetry]]></title><description><![CDATA[How I Built a Fully Observable AI Agent with SigNoz and OpenTelemetry]]></description><link>https://nimithpoojary.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>How I Built a Fully Observable AI Agent with SigNoz and OpenTelemetry</title><link>https://nimithpoojary.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 00:42:16 GMT</lastBuildDate><atom:link href="https://nimithpoojary.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How I Built a Fully Observable AI Agent with SigNoz and OpenTelemetry]]></title><description><![CDATA[Introduction
AI agents are powerful but they are like black boxes — you send a question and get an answer, but you have no idea what happened in between. Which step was slow? Did the LLM fail? How man]]></description><link>https://nimithpoojary.hashnode.dev/how-i-built-a-fully-observable-ai-agent-with-signoz-and-opentelemetry</link><guid isPermaLink="true">https://nimithpoojary.hashnode.dev/how-i-built-a-fully-observable-ai-agent-with-signoz-and-opentelemetry</guid><dc:creator><![CDATA[Nimith Poojary]]></dc:creator><pubDate>Sun, 26 Jul 2026 13:04:43 GMT</pubDate><content:encoded><![CDATA[<h2>Introduction</h2>
<p>AI agents are powerful but they are like black boxes — you send a question and get an answer, but you have no idea what happened in between. Which step was slow? Did the LLM fail? How many tokens did it use?</p>
<p>I built Agent Debugger to solve this problem — a Python AI agent where every single step is visible in SigNoz using OpenTelemetry.</p>
<p>This was built for the Agents of SigNoz hackathon by WeMakeDevs.</p>
<h2>What is the Project?</h2>
<p>Agent Debugger is an AI agent that answers questions in 3 steps:</p>
<ol>
<li><p><strong>Plan</strong> — The LLM converts the user question into a search query</p>
</li>
<li><p><strong>Search</strong> — A search tool runs the query</p>
</li>
<li><p><strong>Synthesize</strong> — The LLM uses the search results to give a final answer</p>
</li>
</ol>
<p>Every step sends a trace to SigNoz so you can see exactly what happened.</p>
<h2>Tech Stack</h2>
<ul>
<li><p><strong>Python</strong> — main programming language</p>
</li>
<li><p><strong>Groq + LLaMA 3.1</strong> — free and fast AI model</p>
</li>
<li><p><strong>OpenTelemetry</strong> — tracks every step as a span</p>
</li>
<li><p><strong>SigNoz</strong> — visualizes all the traces and spans</p>
</li>
<li><p><strong>Docker</strong> — runs SigNoz locally</p>
</li>
</ul>
<h2>Architecture</h2>
<h2>Setting Up SigNoz</h2>
<p>I used the new Foundry CLI to install SigNoz with Docker:</p>
<pre><code class="language-bash">curl -fsSL https://signoz.io/foundry.sh | bash
foundryctl cast -f casting.yaml
</code></pre>
<p>Then I opened <a href="http://localhost:8080">http://localhost:8080</a> and created my account. SigNoz was running in minutes!</p>
<h2>Instrumenting the Agent with OpenTelemetry</h2>
<p>I set up OpenTelemetry to send traces to SigNoz using OTLP over gRPC on port 4317:</p>
<pre><code class="language-python">from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter

provider = TracerProvider(resource=resource)
exporter = OTLPSpanExporter(endpoint="http://localhost:4317", insecure=True)
provider.add_span_processor(BatchSpanProcessor(exporter))
</code></pre>
<h2>Wrapping Each Agent Step in a Span</h2>
<p>Each step of the agent is wrapped in its own span:</p>
<pre><code class="language-python">def _llm_call(span_name, system_prompt, user_prompt):
    with tracer.start_as_current_span(span_name) as span:
        span.set_attribute("gen_ai.system", "groq")
        span.set_attribute("gen_ai.request.model", MODEL)
        span.set_attribute("gen_ai.prompt", user_prompt)
        response = client.chat.completions.create(...)
        span.set_attribute("gen_ai.completion", content)
        return content
</code></pre>
<p>This means every LLM call appears as its own span in SigNoz with all the details attached.</p>
<h2>What it Looks Like in SigNoz</h2>
<p>When I run the agent and open SigNoz Traces Explorer, I can see:</p>
<ul>
<li><p><strong>agent.run</strong> — the full request (1.26 seconds total)</p>
</li>
<li><p><strong>llm.plan</strong> — LLM planning step (179ms)</p>
</li>
<li><p><strong>tool.search</strong> — search tool (190ms)</p>
</li>
<li><p><strong>llm.synthesize</strong> — final answer generation (889ms)</p>
</li>
</ul>
<p>The waterfall view shows exactly where time is being spent. If the LLM is slow, I can see it. If the tool fails, I can see the error in the span.</p>
<h2>What I Learned</h2>
<ul>
<li><p>OpenTelemetry makes it easy to add observability to any Python app</p>
</li>
<li><p>SigNoz gives a beautiful UI to visualize traces without any complex setup</p>
</li>
<li><p>AI agents need observability just like microservices do</p>
</li>
<li><p>The span waterfall is incredibly useful for debugging agent performance</p>
</li>
</ul>
<h2>Conclusion</h2>
<p>Before this project, AI agents were a black box to me. Now with SigNoz and OpenTelemetry, every step is visible and debuggable. This is the future of AI observability.</p>
<p>GitHub: <a href="https://github.com/nimithpoojary/agent-signoz-debugger">https://github.com/nimithpoojary/agent-signoz-debugger</a></p>
<p>Built for Agents of SigNoz Hackathon by WeMakeDevs</p>
]]></content:encoded></item></channel></rss>