Skip to main content
Back to timeline
Databricks BlogSource publication:

Databricks launches Unity Gateway Insights: it reads millions of agent traces and ranks token waste by cost

Synopsis

Databricks released Unity Gateway Insights, which uses Genie to analyze millions of agent traces alongside business data and ontology, surfacing recurring MCP errors, simple tasks running on expensive frontier models, and repeated workflows worth turning into shared skills. The report ranks each kind of waste by token cost and links every finding to example sessions; Databricks says seven small bugs in its own MCP servers alone accounted for about $1.2M in annual waste.

Source-provided article image: Introducing Unity Gateway Insights
Databricks Blog

Interpretation

Databricks released Unity Gateway Insights, which turns agent-trace analysis into an on-demand report: under AI Gateway > Observability > Insights, a user picks the last day, 7 days, or 30 days and gets a report on the token economics of a coding-agent rollout. Teams cutting AI costs have typically started with budgets or open-source models, while trace analysis inside Databricks had already exposed waste that the budget view misses. Databricks' internal comparison was an offline replay showing no performance gain from upgrading Opus 4.8 to Opus 5, so the team stayed on the cheaper 4.8.

The report answers two questions, what people are working on and where money can be saved, and lets users add up to 10 questions of their own. Workstreams are ranked by the mismatch between their share of sessions and their share of tokens, so a workstream with 10% of sessions and 35% of tokens is flagged as the first place to look. Each finding links to example sessions so the traces behind it can be opened, and follow-up questions can go to Genie, such as which MCP server wasted the most tokens this month and who owns it.

Waste is grouped into three kinds: failing MCP tool calls, simple tasks running on frontier models, and workflows that recur in at least three sessions or across two engineers. When a tool call fails, agents retry or work around it until the task gets done, so the session looks successful while every retry is billed. Databricks says the $1.2M it found came from just seven small bugs in its MCP servers, comprising $499K in wasted tokens plus 12,000 hours of engineers waiting on agents, and fixing all seven took about an hour.

It depends on four things: the ug CLI automatically turns on each agent's own OpenTelemetry tracing for Claude Code, Codex, or GitHub Copilot; traces land in a governed Delta unified trace table in Unity Catalog; Genie writes the SQL and reads sessions using Genie Ontology; and Databricks SQL queries full trace history at scale. A standalone gateway records only the requests that pass through it, and capturing the rest of each session means instrumenting every coding agent and exporting traces to a data platform. Traces hold prompts, code, and tool output, so only the table's owner can query it until admins grant access with Unity Catalog grants and row filters, and Insights reads the table in place rather than exporting it.

Perspective

The report covers Databricks' product introduction of Unity Gateway Insights and its internal coding-agent deployment experience; the report feature targets teams already running coding agents through Unity Gateway, who must first set up the unified trace table and launch agents with the ug CLI.

The $1.2M and 12,000 hours are Databricks' estimates from its own MCP server bugs rather than cross-team measurements; the workflow recurrence threshold of at least three sessions or two engineers and the waste categories are criteria set by this product.