Help us improve
Share bugs, ideas, or general feedback.
From MLflow Skills
Searches and retrieves MLflow traces by ID, session, user, status, or execution time using CLI commands. Helps debug failed traces and filter trace data.
npx claudepluginhub mlflow/skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/mlflow:retrieving-mlflow-tracesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Choose the right approach based on what you have:
Queries, tags, evaluates, and manages MLflow traces via MCP tools. Used for debugging, performance analysis, feedback logging, custom scoring, and trace cleanup.
Retrieves and debugs trace and span data from Arize ML observability platform using arize_toolkit CLI. Lists recent traces, fetches by ID, shows spans, analyzes latency/tokens/cost, exports data.
Analyzes a single MLflow trace to debug, investigate, root-cause errors, or understand behavior. Parses trace JSON with spans, status codes, inputs/outputs, and assessments.
Share bugs, ideas, or general feedback.
Choose the right approach based on what you have:
| You have... | Use | Command |
|---|---|---|
| Trace ID | Single fetch | mlflow traces get --trace-id <id> |
| Session/user/filters | Search | mlflow traces search --experiment-id <id> --filter-string "..." |
Single fetch - Use when you have a specific trace ID (e.g., from UI, logs, or API response):
mlflow traces get --trace-id tr-69f72a3772570019f2f91b75b8b5ded9
Search - Use when you need to find traces by criteria (session, user, status, time range, etc.):
mlflow traces search --experiment-id 1 --filter-string "metadata.\`mlflow.trace.session\` = 'session_abc'"
trace_id, status (OK/ERROR), timestamp_ms, execution_time_ms, tags, metadata, assessments (human feedback, evaluation results)name, type, attributes, start_time, end_timemlflow traces search --helpmlflow traces search --help
Always run this first to get accurate flags for the installed MLflow version.
The mlflow traces search command is used to search for traces in an MLflow experiment.
Filter traces associated with a specific MLflow run:
# All traces for a run
mlflow traces search --run-id <run_id>
# Failed traces for a run
mlflow traces search --run-id <run_id> --filter-string "trace.status = 'ERROR'"
# Can combine with experiment-id
mlflow traces search --experiment-id 1 --run-id <run_id>
When debugging an issue from the MLflow UI, filter by session or user ID to get all related traces:
# All traces for a specific session (use backticks for special characters in key)
mlflow traces search --experiment-id 1 --filter-string "metadata.\`mlflow.trace.session\` = 'session_abc123'"
# All traces for a specific user
mlflow traces search --experiment-id 1 --filter-string "metadata.\`mlflow.trace.user\` = 'user_456'"
# Failed traces in a session (for root cause analysis)
mlflow traces search --experiment-id 1 --filter-string "metadata.\`mlflow.trace.session\` = 'session_abc123' AND trace.status = 'ERROR'"
# Session traces ordered by time (to see sequence of events)
mlflow traces search --experiment-id 1 --filter-string "metadata.\`mlflow.trace.session\` = 'session_abc123'" --order-by "timestamp_ms ASC"
mlflow traces search --experiment-id 1 --filter-string "trace.status = 'ERROR'"
mlflow traces search --experiment-id 1 --filter-string "trace.status = 'OK'"
# Timestamps are in milliseconds since epoch
# Get current time in ms: $(date +%s)000
# Last hour: $(( $(date +%s)000 - 3600000 ))
mlflow traces search --experiment-id 1 --filter-string "trace.timestamp_ms > $(( $(date +%s)000 - 3600000 ))"
# Traces slower than 1 second
mlflow traces search --experiment-id 1 --filter-string "trace.execution_time_ms > 1000"
# By tag
mlflow traces search --experiment-id 1 --filter-string "tag.environment = 'production'"
# By metadata
mlflow traces search --experiment-id 1 --filter-string "metadata.user_id = 'user_123'"
# Escape special characters in key names with backticks
mlflow traces search --experiment-id 1 --filter-string "tag.\`model-name\` = 'gpt-4'"
mlflow traces search --experiment-id 1 --filter-string "metadata.\`user.id\` = 'abc'"
mlflow traces search --experiment-id 1 --filter-string "feedback.rating = 'positive'"
mlflow traces search --experiment-id 1 --filter-string "trace.text LIKE '%error%'"
Control result count and iterate through pages:
# Limit results per page
mlflow traces search --experiment-id 1 --max-results 50
# Output includes "Next page token: <token>" if more results exist
# Use --page-token to fetch next page
mlflow traces search --experiment-id 1 --max-results 50 --page-token "eyJvZmZzZXQiOiA1MH0="
# Output format (table or json)
mlflow traces search --experiment-id 1 --output json
# Include span details in output
mlflow traces search --experiment-id 1 --include-spans
# Order results
mlflow traces search --experiment-id 1 --order-by "timestamp_ms DESC"
When you need to retrieve details about a specific trace, use the mlflow traces get command.
mlflow traces get --trace-id <trace_id>
For detailed syntax, fetch from documentation:
WebFetch(
url: "https://mlflow.org/docs/latest/genai/tracing/search-traces.md",
prompt: "Extract the filter syntax table showing supported fields, operators, and examples."
)
Common filters:
trace.status: OK, ERROR, IN_PROGRESStrace.execution_time_ms, trace.timestamp_ms: numeric comparisonmetadata.\mlflow.trace.session`, metadata.`mlflow.trace.user``: session/user filteringtag.<key>, metadata.<key>: exact match or patternspan.name, span.type: exact match or patternfeedback.<name>, expectation.<name>: assessmentsPattern operators: LIKE, ILIKE (case-insensitive), RLIKE (regex)
For mlflow.search_traces(), see: https://mlflow.org/docs/latest/genai/tracing/search-traces.md