Skip to content

Route MLflow tracing to a shared, UC-backed Claude Code experiment#134

Merged
rohita5l merged 6 commits into
mainfrom
tracing-single-shared-experiment
Jun 3, 2026
Merged

Route MLflow tracing to a shared, UC-backed Claude Code experiment#134
rohita5l merged 6 commits into
mainfrom
tracing-single-shared-experiment

Conversation

@rohita5l
Copy link
Copy Markdown
Collaborator

@rohita5l rohita5l commented Jun 3, 2026

Summary

Reworks MLflow tracing from the original per-agent, per-user model into a single shared, Unity Catalog-backed experiment that only Claude Code routes to.

  • One shared experiment. All users converge on one pre-provisioned ucode-traces experiment (matched by leaf name) instead of each user/agent getting its own. ucode no longer creates it — an admin
    provisions a ucode-traces experiment whose traces are backed by a Unity Catalog table, and ucode asserts it exists (failing with actionable setup steps if not).
  • UC-backed storage + SQL warehouse. Traces land in a Unity Catalog table rather than the classic MLflow trace store. This requires MLFLOW_TRACING_SQL_WAREHOUSE_ID — without it the exporter silently drops
    every trace — so ucode resolves a SQL warehouse and injects the id.
  • Claude Code only. Codex and OpenCode tracing is removed. They relied on the @mlflow/codex / @mlflow/opencode JS clients, which can only write to the classic (non-UC) trace store. Tracing now flows
    exclusively through Claude Code's mlflow autolog claude Stop hook (pinned mlflow CLI 3.11.x via uv tool). Gemini was never wired.
  • configure --tracing flag. Enables tracing for just-configured workspace(s) without re-prompting.
  • ucode status now shows the shared experiment, its Unity Catalog destination, and the SQL warehouse id.

rohita5l and others added 4 commits June 3, 2026 10:56
Collapse the per-agent, per-user tracing model into one shared experiment
(/Shared/ucode-traces) so every agent and every user's coding sessions
converge in one place. The first user to configure tracing creates the
experiment; everyone after resolves the same one by name.

Also includes the `configure --tracing` flag for enabling tracing on
just-configured workspaces without re-prompting.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Stop creating the MLflow experiment. ucode now asserts that an admin has
already provisioned a `ucode-traces` experiment whose traces are stored in
Unity Catalog, identified by the `databricksTraceDestinationPath` tag holding
a catalog.schema.table value. Any UC destination qualifies. If none exists (or
the match isn't UC-backed), fail with setup instructions instead of silently
creating a non-UC experiment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Writing traces to a Unity Catalog-backed experiment requires a SQL warehouse
via MLFLOW_TRACING_SQL_WAREHOUSE_ID; without it the MLflow exporter silently
drops every trace (verified: 0 rows landed in the UC table until the var was
set). configure tracing now resolves a warehouse (preferring a RUNNING one),
persists it, injects it into each agent's tracing env, and fails with setup
instructions when no warehouse exists. Verified end-to-end: a headless Claude
run now lands traces in the UC trace table.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codex and OpenCode used the @mlflow/codex / @mlflow/opencode JS clients,
which only reach the classic (non-UC) trace store, so their tracing is
removed. Tracing now routes exclusively through Claude Code's
`mlflow autolog claude` Stop hook, which writes to the shared
UC-backed ucode-traces experiment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@rohita5l rohita5l changed the title Route all agents and users to a single shared MLflow experiment Route MLflow tracing to a shared, UC-backed Claude Code experiment Jun 3, 2026
@rohita5l rohita5l requested a review from AarushiShah-db June 3, 2026 20:47
rohita5l and others added 2 commits June 3, 2026 16:50
Cast the isinstance-narrowed object to dict so ty doesn't treat
dict.get keys as Never, matching the cast pattern used in databricks.py.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@rohita5l rohita5l merged commit 3cfa6f5 into main Jun 3, 2026
2 checks passed
@rohita5l rohita5l deleted the tracing-single-shared-experiment branch June 3, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants