2026-11-26 15:48 UTC

SigNoz publishes OpenTelemetry guide for tracing AI-agent workflows

state: seedheat: lowuncertainty: mediumrelevance: mediumagent-observability opentelemetrySigNozDhruv Ahuja

What is this?

SigNoz, an OpenTelemetry-native observability vendor, published Dhruv Ahuja’s “AI Agent Observability with OpenTelemetry” on October 19, 2026. The guide includes a runnable Python demo and walkthrough for tracing an OpenAI Agents SDK workflow: application requests, model calls, tool execution, sessions and guardrail failures. It shows how traces and metrics can expose token use, latency and tool behavior in SigNoz Cloud. This is a vendor-authored practical guide, not evidence of a new OpenTelemetry standard or independent adoption. The article itself says GenAI instrumentation coverage is uneven and evolving; some packages need to be installed and tracked manually. Its model name is part of the demo, not an announcement of a model release.

Why it matters

Agent workflows can fail, loop, or become costly in ways a single request-level log cannot explain. The guide demonstrates how OpenTelemetry’s trace hierarchy can make model and tool steps inspectable alongside the surrounding application, helping teams debug behavior, compare latency and token usage, and spot redundant calls. That could make production agents easier to operate and govern, while vendor-neutral telemetry may reduce dependence on proprietary instrumentation. The example also exposes trade-offs: capturing prompts aids debugging but may expose sensitive data, and the guide describes GenAI instrumentation as less mature than conventional application instrumentation.

Current assessment

New: SigNoz published a detailed implementation guide and demo, dated October 19, 2026, for instrumenting a Python agent with OpenTelemetry GenAI packages and viewing telemetry in SigNoz Cloud. The article describes separate instrumentation for agent orchestration and underlying model calls, producing hierarchical spans, token-usage attributes, duration metrics, and tool-call traces; it also shows recording guardrail exceptions and disabling message-content capture while retaining operational telemetry. The article reports a demo run with duplicate tool execution and presents it as an example of agent variability, not as a general benchmark. It says the dedicated packages are not yet included in opentelemetry-bootstrap’s discovery list, coverage for agent features varies, and package versions should be pinned and checked. These are the guide’s claims and implementation notes; the supplied evidence does not independently verify product behavior, adoption, or broader performance. The SigNoz Cloud account requirement makes the walkthrough useful but also vendor-directed. Track subsequent changes to OpenTelemetry GenAI conventions and package maturity separately from this publication.

Measured heat

now 0 pts/hpeak 10 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 248h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-16 08:21 (minted)⭐ origin echo-reconstructedThis SigNoz article presents original implementation guidance and a demo for instrumenting AI-agent workflows with OpenTelemetry; I found no
SigNoz on blog (echo) · attributed from hn.story.50515018 · published time unknown
—
11-16 07:30first on hacker news · published · lag ?OpenTelemetry and AI Agents' Observability
dhruv_ahuja
—
11-16 07:30amplified on hacker news 👑hn.story.50515018
dhruv_ahuja
peak 9 · 0 comments · 100% of case engagement
11-16 08:20our radar first saw it · lag ?discovery anchor: hn.story.50515018—
pace: p54 vs 2096 stories at the 168h mark (now 248h old) — ahead of advocacy-groups-sue-ai-companies-to-halt-model-development (1.1x), behind agency-agent-computer-nixos-image (0.9x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnOpenTelemetry and AI Agents' Observability
Retrieved article excerpt

Open article · Retrieved 2026-11-16T08:21:03.037095+00:00

# AI Agent Observability with OpenTelemetry

Last Updated: October 19, 202618 min read

AI agents don't just call a model and return its response. Instead, they orchestrate entire workflows that involve selecting tools for LLMs to use, evaluating guardrails, routing between LLM calls, and managing context across conversation turns. This means that a single user request can spawn dozens of internal steps, each one a potential point of failure, latency, or unexpected cost.

AI agent observability is the practice of capturing these execution flows so you can understand *what* the agent did, *why* it chose that path, and *how* it performed. In practice, this means tracing an agent run's execution path, capturing inputs and outputs at each step, and tracking cost, token usage, latency, and error rates.

AI agent tracing builds the foundation for AI agent observability. Without tracing, debugging an AI agent becomes a game of trying to guess which event triggered what decision in the agent workflow, and why.

## Why do AI agents need observability?

A request can return successfully while the agent gives an incorrect answer, takes too long on a particular step, or triggers duplicate LLM or tool calls. Agent observability gives engineers the evidence to investigate these problems and compare behavior across runs.

Let's look at some of these problems in more detail.

### LLM non-determinism compounds across agent steps

A single LLM call is already non-deterministic: the same prompt can produce different outputs across runs. Agents amplify this because they chain multiple LLM calls together, where the output of one step determines the input of the next.

This means variance doesn't just exist at one point. Rather, it compounds across the workflow. A slightly different model response in step one can cause the agent to select a completely different tool in step two, which changes the context passed to step three, and so on. Reproducing a specific agent run becomes nearly impossible without capturing the full execution path.

### Agents can silently produce incorrect results

Traditional software can also return incorrect results without throwing an error. With agents, these failures can be harder to catch because each run can take a different path: the workflow completes without any error, but the agent selected the wrong tool, retrieved stale context, or returned a response that is confidently incorrect.

Without observability, these silent failures only surface when a user complains or when downstream systems consume bad output. Tracing each decision in the agentic loop, such as which tool was selected, what context was available, what the model actually returned, is the only reliable way to evaluate whether an agent's "successful" run was actually logically correct.

### Cost and latency are unpredictable by design

Agents decide at runtime how many tools to call and how many LLM roundtrips to make. A simple user query might resolve in one LLM call, while a similar query might trigger several tool calls and model invocations depending on the agent's reasoning.

This makes cost and latency inherently unpredictable. Observability lets engineers track token usage, tool call frequency, and per-step latency across runs to identify expensive patterns early. For example, if two models with different pricing tiers perform comparably for a given workload, engineers can switch to the cheaper option — but only if they have the data to make that comparison.

## How does OpenTelemetry enable AI agent observability?

[OpenTelemetry](https://signoz.io/opentelemetry/) (OTel) is a CNCF graduated project for instrumenting applications to emit telemetry data (primarily [traces, metrics, and logs](https://signoz.io/blog/o11y/)) in a vendor-neutral format. What makes it uniquely suited for agentic applications is that your visibility extends beyond the AI agent to the entire request: what endpoint did the user call, what DB queries ran, were any background jobs enqueued, did the application make any downstream API calls?

OpenTelemetry enables developers to instrument entire applications, including their AI agents.

*OpenTelemetry enables developers to instrument entire applications, including their AI agents.*

## Setting up AI agent observability with OpenTelemetry

### Prerequisites

- Python 3.12 or newer. Download the [latest version](https://www.python.org/downloads/).
- A [SigNoz Cloud account](https://signoz.io/teams/) for visualizing telemetry data.
- An [OpenAI API key](https://platform.openai.com/api-keys) to run the agent.
- An API client like [Bruno](https://www.usebruno.com/) or [Postman](https://www.postman.com/) to test endpoints.

### Setting up SigNoz Cloud

SigNoz Cloud is an OpenTelemetry-native observability platform that unifies traces, metrics, and logs in a single interface.

- [Sign up](https://signoz.io/teams/) for a free SigNoz Cloud account.
- [Follow the documentation](https://signoz.io/docs/ingestion/signoz-cloud/keys/) to generate an ingestion key.
- Keep your workspace region (e.g., `us`, `in`, `eu`) and ingestion key handy for the application configuration.

### Running the Demo Application

Clone and navigate to the demo application:

Copy

```
git clone --filter=blob:none --sparse https://github.com/SigNoz/examples.git
git -C examples sparse-checkout set python/otel-ai-agent-observability-demo
cd examples/python/otel-ai-agent-observability-demo
```

Create and activate a Python virtual environment:

Copy

```
python3.12 -m venv .venv
source .venv/bin/activate
```

Install the application and [OpenTelemetry Python](https://signoz.io/opentelemetry/python/) dependencies:

Copy

```
pip install -r requirements.txt
```

The [`requirements.txt` file](https://github.com/SigNoz/examples/blob/main/python/otel-ai-agent-observability-demo/requirements.txt) pins the following OTel packages:

- `opentelemetry-distro`: Provides a convenient mechanism to configure some of the more common options for Python auto-instrumentation.
- `opentelemetry-exporter-otlp`: Installs [the OTLP exporters](https://signoz.io/blog/what-is-otlp/) needed to deliver telemetry data to any [OpenTelemetry-compatible backend](https://signoz.io/blog/opentelemetry-backend/).
- `opentelemetry-instrumentation-genai-openai` and `opentelemetry-instrumentation-genai-openai-agents`: Modern OpenAI Agents and OpenAI Python API instrumentation packages from the dedicated [OpenTelemetry GenAI repository](https://github.com/open-telemetry/opentelemetry-python-genai).

Next, run `opentelemetry-bootstrap` to detect widely used Python libraries (like the [FastAPI web framework](https://signoz.io/blog/opentelemetry-fastapi/) and HTTPX client library) and install their corresponding instrumentation packages:

Copy

```
opentelemetry-bootstrap --action=install
```

Dangling OpenAI instrumentation package

`opentelemetry-bootstrap` currently installs a deprecated `opentelemetry-instrumentation-openai-v2` package by default.  
However, because our `requirements.txt` explicitly installs the modern `opentelemetry-instrumentation-genai-*` libraries, OpenTelemetry resolves to the newer packages at runtime.

You can safely leave the v2 package alone or uninstall it.

Start the application using `opentelemetry-instrument` to automatically instrument our application, including the AI agent workflow:

Copy

```
OPENAI_API_KEY="<your-openai-api-key>" \
OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.<your-region>.signoz.cloud:443" \
OTEL_EXPORTER_OTLP_HEADERS="signoz-ingestion-key=<your-ingestion-key>" \
OTEL_SERVICE_NAME="otel-ai-agent-observability-demo" \
OTEL_RESOURCE_ATTRIBUTES="service.version=1.0.0,deployment.environment=dev" \
OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" \
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=span_only \
opentelemetry-instrument fastapi run --port 8085 --workers 1
```

Here is what these [OpenTelemetry environment variables](https://signoz.io/blog/otel-environment-variables/) configure:

- `OTEL_SERVICE_NAME="otel-ai-agent-observability-demo"`: Uniquely identifies the application in SigNoz Cloud.
- `OTEL_RESOURCE_ATTRIBUTES`: Attaches metadata (version `1.0.0`, environment `dev`) to all exported telemetry. This is used to organize and filter telemetry in the OpenTelemetry backend.
- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=span_only`: Captures model prompts, completions, and tool definitions as span attributes on LLM model spans.

Correlating logs to traces

Application logs are automatically correlated with traces by the `opentelemetry-bootstrap`-installed logging instrumentation. This eliminates the need to set the `OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED` environment variable, which has been deprecated in the more recent OpenTelemetry releases.

The FastAPI server starts on port 8085. Calling `/` returns a quick health check response:

Copy

```
(.venv)  ❯ curl "http://127.0.0.1:8085/"
{"message":"OpenTelemetry NBA agent demo is running"}
```

The demo is now running. Before exploring the agent code, let’s look at the OpenTelemetry conventions and instrumentation packages used to capture AI agent workflows.

### Understanding OpenTelemetry’s evolving GenAI conventions

While early instrumentation discussions focused solely on "LLM tracing", OpenTelemetry standardizes AI telemetry under the broader umbrella of `Generative AI` (GenAI), using [semantic conventions prefixed with `gen_ai.*`](https://github.com/open-telemetry/semantic-conventions-genai/blob/4f85037ef86e92c510d2ef881a58f1076f6fc0e4/docs/gen-ai/README.md).

Because GenAI patterns and agentic harnesses evolve far more rapidly than traditional HTTP or database libraries, OpenTelemetry created a dedicated repository, [`open-telemetry/opentelemetry-python-genai`](https://github.com/open-telemetry/opentelemetry-python-genai), to enable maintainers to independently develop and publish these libraries.

This migration introduced a cleaner, **split-scope architecture**:

1. **`opentelemetry.instrumentation.genai.openai_agents`**: Instruments the agent orchestration harness, emitting spans for workflow execution (`invoke_workflow`) and agent routing (`invoke_agent`).
2. **`opentelemetry.instrumentation.genai.openai`**: A companion package that instruments the underlying model calls (`chat`), capturing token usage (`gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`), model parameters, and prompt context.

The [earlier Agents instrumentation](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation-genai/opentelemetry-instrumentation-openai-agents-v2) combined workflow and model-call tracing in a single package.

Additionally, because `opentelemetry-bootstrap` has not yet added these dedicated GenAI packages to its automated discovery list, you must install and track them separately through your `requirements.txt` or `pyproject.toml` files.

Developers must install the latest GenAI instrumentation libraries manually as they aren't yet registered with opentelemetry-bootstrap.

*Developers must install the latest GenAI instrumentation libraries manually as they aren't yet registered with opentelemetry-bootstrap.*

Varying maturity across GenAI instrumentation packages

Coverage varies across GenAI instrumentation packages, especially for agent features such as handoffs and guardrails. It's recommended that you pin your instrumentation packages explicitly and check their changelogs when upgrading dependencies.

### How the NBA agent uses tools, guardrails, and sessions

Now that we've seen how OpenTelemetry separates agent orchestration from model calls, let's look at the code behind the NBA agent's workflow. [Skip to the next section](https://signoz.io/blog/opentelemetry-ai-agent-observability/#visualizing-ai-agent-workflows-with-opentelemetry) if you want to jump directly to generating and inspecting traces.

FastAPI serves our HTTP endpoints, the [OpenAI Agents SDK](https://openai.github.i
dhruv_ahuja90
🟧 echo.blog ⭐This SigNoz article presents original implementation guidance and a demo for instrumenting AI-agent workflows with OpenTelemetry; I found noSigNoz——

Interpretation history

Decision trace