
A trace is a detailed record of everything that happens when an AI agent processes a request. Think of it like a flight recorder for your AI system.
| Element | What It Records |
|---|---|
| Prompts | What the user asked |
| Tool calls | Which tools the agent used |
| Responses | What the agent replied |
| Latency | How long each step took |
| Execution paths | The sequence of decisions made |
Without traces, you are essentially flying blind. You cannot answer:
Simple analogy: Traces are like a detailed receipt for every AI interaction — showing every ingredient used, every step taken, and how long each step took.
Traditionally, traces are stored inside SaaS observability tools (specialized monitoring platforms).
Traditional Approach:
Agent → Observability Tool → (stuck here)
↓
Hard to query with SQL
Hard to join with business data
Governance is fragmented
Requires extra pipelines to move data
Sensitive prompt data is hard to protect
When traces live only in observability systems:
OpenTelemetry (OTel) is an open-source standard for collecting and exporting telemetry data from software systems.
OpenTelemetry collects three types of signals:
1. TRACES → execution paths and spans
2. LOGS → structured event records
3. METRICS → numerical measurements (latency, counts, etc.)
Simple analogy: OTel is like a universal power adapter. Your device (agent) uses one standard plug, and it works with any compatible outlet (storage system).
Unity Catalog is Databricks' centralized governance layer for all data assets. It provides:
| Feature | What It Means |
|---|---|
| Fine-grained access controls | Control who sees which tables, columns, or rows |
| Column masking | Hide sensitive data (like PII in prompts) |
| Row-level filtering | Restrict which rows a user can see |
| Delta tables | Scalable, queryable storage format |
Traces stored in Unity Catalog become first-class data — meaning they can be:
Normally, getting data from an application into a data lake requires:
App → Message Bus (Kafka) → Processing Layer → Storage
This is complex, expensive, and requires infrastructure management.
Zerobus Ingest is Databricks' fully managed, serverless ingestion engine that:
App (OTel client)
↓
Zerobus Ingest ← handles throughput, durability, zero infrastructure
↓
Unity Catalog (Delta tables)
Simple analogy: Zerobus Ingest is like a managed postal service. You drop your package (trace data) at the door, and it handles all the routing, sorting, and delivery — no warehouse management required.
When you set up OTel tracing in Unity Catalog, six table types are provisioned:
<table_prefix>_otel_spans → detailed execution data per request
<table_prefix>_otel_logs → structured log/event data
<table_prefix>_otel_metrics → numerical telemetry (latency, counts)
<table_prefix>_otel_annotations → MLflow-specific metadata, tags, feedback
<table_prefix>_trace_unified → one record per trace (full picture)
<table_prefix>_trace_metadata → MLflow tags grouped by trace ID (faster)
| Table | Best Used For |
|---|---|
otel_spans | Debugging individual steps |
otel_logs | Reviewing events during execution |
otel_metrics | Performance monitoring |
trace_unified | Full end-to-end trace analysis |
trace_metadata | Quick metadata lookups |
Instrumentation means adding code (or using automatic tools) to capture trace data from your agent.
Automatic tracing:
mlflow.langchain.autolog()
# Automatically captures all LangGraph model calls and tool calls
Manual tracing:
@mlflow.trace
def my_agent_entrypoint(input):
# Creates a root span for the entire request
...
A span is one unit of work within a trace. A full trace is made up of many spans:
Trace (full request)
└── Root Span: handle_user_request
├── Span: call_llm
├── Span: call_tool_genie (1st call)
├── Span: call_tool_genie (2nd call)
├── Span: call_tool_genie (3rd call)
└── Span: generate_response
1. Ad-hoc SQL queries
SELECT request, response, latency_ms
FROM mlflow_experiment_trace_unified
WHERE latency_ms > 5000
2. Native dashboards (built into MLflow Experiment UI)
3. Custom dashboards (AI/BI Dashboards)
4. Natural language queries via Genie
Traces contain prompts and responses, which often include:
Trace Data in Unity Catalog
↓
┌─────────────────────────────────┐
│ Fine-grained access controls │ ← Who can access which tables
│ Column masking │ ← Hide sensitive columns
│ Row-level filtering │ ← Restrict which rows are visible
└─────────────────────────────────┘
Important note: The system does not automatically detect or redact PII. You must configure the governance rules yourself using Unity Catalog's tools.
Change Data Feed (CDF) is a Delta table feature that tracks only the new or changed rows since the last time you processed the data.
Without CDF:
Every pipeline run → Scan entire trace table → Slow and expensive
With CDF:
Every pipeline run → Read only new traces since last run → Fast and efficient
Evaluation means systematically scoring your agent's outputs to measure quality.
Step 1: Bootstrap an evaluation dataset from real traces
Real user interactions → Captured as traces → Extracted as eval dataset
This is better than synthetic data because it reflects actual user behavior.
Step 2: Define judges
Step 3: Score and review
| Type | When | Purpose |
|---|---|---|
| Development eval | Before release | Validate behavior before shipping |
| Production monitoring | After release | Detect regressions with real users |
All the concepts above connect into a self-reinforcing cycle:
Production Agent
↓
Traces captured
↓
Stored in Unity Catalog
↙ ↘
Analytics Evaluation
Dashboards & Monitoring
Alerts ↓
↘ ↙
Insights & Improvements
↓
Better Agent
↓
(cycle repeats)
Each loop through the cycle:
1. AI Agent runs anywhere
↓
2. OTel standard instruments the agent (spans, logs, metrics)
↓
3. Zerobus Ingest receives the telemetry (no Kafka needed)
↓
4. Unity Catalog stores it in Delta tables (governed, scalable)
↓
5. Teams query with SQL, build dashboards, use Genie
↓
6. Governance protects sensitive prompt data
↓
7. ETL pipelines enable streaming analytics and alerts
↓
8. Evaluation workflows score agent quality
↓
9. Insights feed back into agent improvement (the flywheel)
Every concept builds on the previous one, creating a complete, production-ready observability system for AI agents.