feat(mlflow): one-switch tracing for Claude and Codex#36
Open
mpkrass7 wants to merge 1 commit into
Open
Conversation
Collaborator
Author
|
Gemini cli looks broken for auto tracing FYI. Feel free to verify for yourselves by following the directions here and watching your logs not update. I flagged in the mlflow channel https://mlflow.org/docs/latest/genai/tracing/integrations/listing/gemini_cli/#configuration-examples |
mpkrass7
commented
May 11, 2026
Collaborator
Author
Adds MLFLOW_TRACING_ENABLED — a single env var that turns on MLflow
tracing for all three CLIs into the same /Users/{owner}/{app} experiment.
- setup_mlflow.py: gates Claude's Stop hook on the new var (default off);
trims docstring and drops redundant tracing_value
- setup_codex.py: installs @mlflow/codex, wires the notify hook, writes
mlflow-tracing.json + MLflow env vars when enabled
- setup_gemini.py: appends Gemini's native OTLP env vars pointed at the
Databricks OTLP collector (/api/2.0/otel) when enabled, then reverted
because Databricks OTLP doesn't accept JSON
- utils.py: resolve_mlflow_experiment_id() helper using databricks-sdk
(codex needs the experiment ID, not name)
- cli_auth.py: rotates the bearer token inside Gemini's OTEL headers so
OTLP ingest survives PAT rotation
- README + app.yaml.template: document the new switch
Co-authored-by: Isaac
6ac9655 to
3b8e627
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Addresses #35
Adds MLFLOW_TRACING_ENABLED: a single env var that turns on MLflow tracing for all three CLIs into the same /Users/{owner}/{app} experiment. It's in the .yaml file now
Co-authored-by: Isaac
Testing
Please test your changes on dogfood before merging.