PreviewYou're previewing CTO AI Forge. Sign in to use it.Sign in
← All lessons
L3 · AI-native architecture & platform8 min read

Observability for AI features and agents

When an AI feature gives a wrong answer or an agent does something odd, you need to reconstruct what happened: what went in, what the model returned, which tools it called, how long it took and what it cost. That is AI observability.

What to capture

  • Traces for each request or agent run, with spans for model calls, retrieval and tool calls.
  • Model metadata: provider, model and version, parameters.
  • Usage: input and output tokens, cost, latency, errors and retries.
  • Content (per your privacy and retention rules): prompts, retrieved documents, outputs — or hashes and samples where full content is too sensitive.
  • Quality signals: eval scores on sampled traffic, user feedback, guardrail triggers.

Use open standards

The OpenTelemetry project publishes semantic conventions for generative AI covering spans, metrics and events, including agent spans, provider-specific conventions (for example Anthropic, AWS Bedrock, Azure AI Inference and OpenAI) and the Model Context Protocol. The conventions are still evolving, but building on them avoids locking your telemetry into one vendor's format and lets AI traces sit next to your existing service traces.

Dashboards that matter

  1. Quality: eval score and feedback per use case over time.
  2. Cost: spend per use case, per team and per unit of value.
  3. Latency and errors: p50/p95 latency, error and retry rates, fallbacks triggered.
  4. Safety: blocked prompts, redactions, injection attempts, tool calls denied.
  5. Agents: steps per run, tools used, runs that hit limits or were stopped.

Privacy by design

Prompts and outputs can contain personal data, secrets or customer code. Decide retention, access and redaction before you turn on full logging — and make the gateway the place where that policy is enforced.

What this means for the CTO

Insist that every AI feature and agent is observable from day one, on the same stack as the rest of your services. It is the difference between a 30-minute and a 3-day investigation when something goes wrong — and the basis for cost control.

Ask your platform team to adopt OpenTelemetry's GenAI conventions where practical and to agree a logging and retention policy with security and privacy before content logging starts.

And make sure someone actually looks at the dashboards: assign an owner per AI feature who reviews quality, cost and incidents every week.

Real example

The OpenTelemetry project publishes semantic conventions for generative AI systems covering spans, metrics and events, with sections for agent spans, provider-specific conventions (Anthropic, AWS Bedrock, Azure AI Inference, OpenAI) and the Model Context Protocol; the conventions are under active development in a dedicated repository. Source: OpenTelemetry — Semantic conventions for generative AI systems ↗

Use it

Quick check · 3 questions

  1. 1.Why use OpenTelemetry's GenAI conventions?

  2. 2.What should be decided BEFORE logging full prompts and outputs?

  3. 3.Which signal is specific to agent observability?

0 of 3 answered

Sources

Last reviewed 2026-10-01.