Storing MLflow Traces in Unity Catalog

MLflow
Unity Catalog
Observability
Learn how to store MLflow traces in Unity Catalog tables using OpenTelemetry format for governed, queryable observability of your AI applications.
Modified

02/07/2026

Summary

  • Store MLflow traces as Delta tables in Unity Catalog for unlimited retention, SQL querying, and governed access control
  • Traces use OpenTelemetry-compatible format, making them interoperable with your existing observability stack
  • Access control is managed through Unity Catalog permissions rather than experiment-level ACLs

Introduction

If you are building generative AI applications on Databricks, observability matters. You need to understand what your models and agents are doing, how they are performing, and where things go wrong. MLflow has long provided tracing capabilities, but traces were historically tied to MLflow experiments with limited querying and access control options.

As of January 2026, you can now store MLflow traces directly in Unity Catalog tables using an OpenTelemetry-compatible (OTEL) format. This means your trace data lives alongside the rest of your governed data assets — queryable with SQL, secured with UC permissions, and stored in Delta tables with unlimited retention. This feature is currently in Beta.

Why Store Traces in Unity Catalog?

Compared to the default experiment-based storage, Unity Catalog trace storage gives you several advantages:

  • Governed access control — permissions are managed through UC schema and table-level grants, not experiment ACLs
  • SQL queryability — query trace data directly from any Databricks SQL warehouse
  • Unlimited storage — Delta tables handle long-term retention without the constraints of experiment storage
  • Broad visibility — anyone with table access can view traces regardless of which experiment produced them
  • OTEL compatibility — trace IDs use URI format, improving interoperability with external observability tools

Getting Started

You will need MLflow 3.9.0 or later and a Unity Catalog-enabled workspace.

pip install "mlflow[databricks]>=3.9.0" --upgrade

Log Traces

Once linked, point your tracing destination at the UC schema and traces flow into Delta tables automatically.

import mlflow
from mlflow.entities import UCSchemaLocation

mlflow.set_tracking_uri("databricks")

mlflow.tracing.set_destination(
    destination=UCSchemaLocation(
        catalog_name="ml_catalog",
        schema_name="traces",
    )
)

@mlflow.trace
def classify_ticket(text):
    # Your model inference logic here
    return {"category": "billing", "confidence": 0.94}

classify_ticket("I was charged twice for my subscription")

Query Traces with SQL

Because traces are stored in Delta tables, you can run standard SQL against them for analysis and monitoring.

-- Find slow spans in the last 24 hours
SELECT
    trace_id,
    span_name,
    duration_ms,
    status_code
FROM ml_catalog.traces.mlflow_experiment_trace_otel_spans
WHERE start_time > current_timestamp() - INTERVAL 24 HOURS
  AND duration_ms > 5000
ORDER BY duration_ms DESC;
WarningLimitations to Know
  • Ingestion is limited to 100 traces/second per workspace and 100MB/second per table
  • UI performance may degrade beyond 2TB of stored trace data
  • Individual trace deletion is not supported through the UI — use SQL DELETE statements directly on the UC tables
  • Currently in Beta with regional availability limited to eastus, eastus2, and westeurope
TipPro Tip

You can export traces to both Unity Catalog and an external OpenTelemetry service simultaneously using MLflow’s dual export configuration. This lets you keep your existing Datadog, Grafana, or other OTEL-compatible tooling while also getting the governance and SQL queryability of UC.

Further Reading

Back to top