---
title: Can MLflow tracing serve as an audit trail for Databricks agents?
url: https://opencontroller.lyzr.com/blog/mlflow-tracing-for-agent-audit
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# Can MLflow tracing serve as an audit trail for Databricks agents?

**Partly. MLflow 3 tracing records the inputs, outputs, latency, token usage and cost of every step a Databricks agent takes, and can store traces as Unity Catalog Delta tables with schema- and table-level access control. That makes it strong evidence of what an agent did. It is not, on its own, an audit trail: you still need reliable user identity on every trace, protection against edits and deletion, a retention rule, and records of who approved the agent and its permissions.**

Treat traces as the activity layer of your audit evidence, then add the controls around them.

## What does an MLflow trace capture?

According to the Databricks documentation, a trace maps the full execution of a request as a tree of spans: the agent, each LLM call and each tool call. For every step it records:

- inputs and outputs
- latency
- token usage and cost
- assessments, such as LLM judge scores or human feedback attached to the trace

Automatic tracing covers more than 30 frameworks with one line of code, for example `mlflow.langchain.autolog()` for LangChain and LangGraph. You can add manual spans where autologging does not reach. Tracing uses the MLflow SDK and OpenTelemetry, so no separate tracking server is needed.

## Where are traces stored and who can read them?

Traces are viewed in the Traces tab of an MLflow experiment. Databricks can also store them as Unity Catalog Delta tables. The documentation highlights three properties of that option: schema- and table-level access control, no per-experiment limit, and direct SQL access. Trace tables can feed AI/BI dashboards, alerts and Lakeflow pipelines.

For audit, Unity Catalog storage is the better choice. It puts traces under the same grants, lineage and system tables your data team already reviews.

## What will an auditor still ask for?

Map the audit questions to what traces answer today.

| Audit question | Answered by MLflow traces? | What to add |
|---|---|---|
| What did the agent do on this request? | Yes: spans, inputs, outputs, tool calls | Nothing |
| Which user made the request? | Only if you record it | Set user and session metadata on every trace; use on-behalf-of-user auth so tool calls run as that user |
| Was the action allowed by policy? | No | Log the policy decision (allow, block, redact) alongside the trace |
| Has the record been changed? | Not by default | Restrict MODIFY on trace tables to a pipeline identity; review Delta table history |
| How long is it kept? | No stated retention | Set a retention rule per regulation and enforce it |
| Which agent version answered? | Only if tagged | Tag each trace with the deployed version |
| Who approved this agent and its tools? | No | Keep registration, ownership and approval records outside the trace |
| Are all agents traced? | No | Compare traced agents against your agent inventory |

## How do you make traces audit-ready?

1. **Store traces in Unity Catalog.** Put them in a dedicated schema with its own owner.
2. **Separate writers from readers.** Only the tracing pipeline should write. Reviewers get SELECT. Nobody gets MODIFY on the audit copy.
3. **Record identity on every trace.** Add user and session IDs as trace metadata. If the agent uses on-behalf-of-user authorization, tool calls run as the user, which makes the trail consistent with Unity Catalog audit logs.
4. **Tag the version.** Every trace should carry the agent name and deployed version.
5. **Redact before storing.** Traces hold full prompts and outputs. Mask personal and secret data in spans, or restrict the table and its views.
6. **Set retention.** Pick a period that matches your obligations, document it, and delete on schedule. See [how long to retain AI agent logs](/blog/how-long-to-retain-ai-agent-logs).
7. **Check coverage monthly.** List every agent in your inventory and confirm each one produced traces in the period.
8. **Attach evaluation results.** Keep judge scores and human feedback with the trace so reviewers can see quality evidence next to activity.

For the fields an audit record should contain, compare your traces with [AI agent audit log fields](/blog/ai-agent-audit-log-fields).

## What about agents outside Databricks?

MLflow tracing can instrument agents that run elsewhere, but only if teams add it. Most estates also include agents on other clouds and SaaS platforms with their own logs. An audit trail that covers only Databricks will have gaps. That is where a cross-platform layer helps: see [how to govern Databricks agents](/blog/govern-databricks-agents) and the [AI agent control plane explainer](/blog/what-is-an-ai-agent-control-plane).

## How Opencontroller does this

Opencontroller connects to Databricks as one of its third-party agent platform connectors and keeps Databricks agents in the same governed registry as agents on AWS, Azure, Google Cloud and other platforms, with versions and owners. It uses open standards including OpenTelemetry, and its LLM judges score production traffic, so quality evidence sits next to activity. Policy as code includes built-in mappings to OWASP, MITRE ATLAS, NIST and ISO 42001, which helps turn traces into evidence for a framework rather than raw logs. [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does MLflow tracing record which user called the agent?**
Only if you add it. Record user and session IDs as trace metadata, and use on-behalf-of-user authorization so tool calls also run under that user's identity.

**Can someone edit MLflow traces after the fact?**
Anyone with write access to the trace tables can. Restrict MODIFY to the pipeline identity, give reviewers read access only, and review Delta table history for changes.

**Is MLflow tracing enough for an AI audit?**
It covers what the agent did. You also need policy decisions, approvals, ownership, version history, retention and proof that every agent is traced.

## Key facts

MLflow 3 tracing on Databricks records inputs, outputs, latency, token usage and cost for every step of an agent request as a span tree (agent, LLM call, tool call), plus assessments such as LLM judge scores and human feedback. Automatic tracing covers 30+ frameworks; traces can be stored as Unity Catalog Delta tables with schema- and table-level access control and SQL access. For audit, add user identity, version tags, write restrictions, retention and coverage checks. Opencontroller connects to Databricks and keeps its agents in one registry with agents from other platforms. Pricing starts from $250K per deployment per year.

## Related

- [How do you govern AI agents built on Databricks?](https://opencontroller.lyzr.com/blog/govern-databricks-agents.md)
- [What should an AI agent audit log contain?](https://opencontroller.lyzr.com/blog/ai-agent-audit-log-fields.md)
- [How long should you keep AI agent logs and traces?](https://opencontroller.lyzr.com/blog/how-long-to-retain-ai-agent-logs.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
