instrumenting-with-mlflow-tracing by mlflow/skills
npx skills add https://github.com/mlflow/skills --skill instrumenting-with-mlflow-tracing根据用户的项目,加载相应的指南:
references/python.mdreferences/typescript.md如果不确定,请在项目中检查是否存在 package.json(TypeScript)或 requirements.txt/pyproject.toml(Python)。
追踪以下操作(具有较高的调试/可观测价值):
| 操作类型 | 示例 | 追踪原因 |
|---|---|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 主入口点、顶层管道、工作流步骤 |
| 端到端延迟、输入/输出日志记录 |
| LLM 调用 | 聊天补全、嵌入 | 令牌使用量、延迟、提示/响应检查 |
| 检索 | 向量数据库查询、文档获取、搜索 | 相关性调试、检索质量 |
| 工具/函数调用 | API 调用、数据库查询、网络搜索 | 外部依赖监控、错误追踪 |
| 智能体决策 | 路由、规划、工具选择 | 理解智能体的推理和选择 |
| 外部服务 | HTTP API、文件 I/O、消息队列 | 依赖故障、超时追踪 |
跳过追踪以下内容(过于细粒度,会增加噪音):
经验法则:追踪那些对你的应用程序调试和问题识别至关重要的操作。
在代码中添加追踪功能后,务必验证追踪是否正常工作。
计划评估你的智能体? 在运行
agent-evaluation之前,追踪功能必须正常工作。请先完成以下验证。
mlflow.search_traces() 或 MlflowClient().search_traces() 检查追踪是否出现在实验中:```python
import mlflow
traces = mlflow.search_traces(experiment_ids=["<experiment_id>"])
print(f"Found {len(traces)} trace(s)")
assert len(traces) > 0, "No traces were logged — check tracking URI and experiment settings"
```
3. 报告结果 — 告知用户找到了多少条追踪记录,并确认追踪功能正常工作
记录用户对追踪的反馈,用于评估、调试和微调。这对于识别生产环境中的质量问题至关重要。
有关以下内容,请参阅 references/feedback-collection.md:
mlflow.log_feedback() 记录用户评分和评论有关以下内容,请参阅 references/production.md:
mlflow-tracing)有关以下内容,请参阅 references/advanced-patterns.md:
有关以下内容,请参阅 references/distributed-tracing.md:
每周安装次数
86
代码仓库
GitHub 星标数
18
首次出现
2026年2月5日
安全审计
安装于
gemini-cli85
github-copilot85
codex84
opencode83
kimi-cli82
amp82
Based on the user's project, load the appropriate guide:
references/python.mdreferences/typescript.mdIf unclear, check for package.json (TypeScript) or requirements.txt/pyproject.toml (Python) in the project.
Trace these operations (high debugging/observability value):
| Operation Type | Examples | Why Trace |
|---|---|---|
| Root operations | Main entry points, top-level pipelines, workflow steps | End-to-end latency, input/output logging |
| LLM calls | Chat completions, embeddings | Token usage, latency, prompt/response inspection |
| Retrieval | Vector DB queries, document fetches, search | Relevance debugging, retrieval quality |
| Tool/function calls | API calls, database queries, web search | External dependency monitoring, error tracking |
| Agent decisions | Routing, planning, tool selection | Understand agent reasoning and choices |
| External services | HTTP APIs, file I/O, message queues | Dependency failures, timeout tracking |
Skip tracing these (too granular, adds noise):
Rule of thumb : Trace operations that are important for debugging and identifying issues in your application.
After instrumenting the code, always verify that tracing is working.
Planning to evaluate your agent? Tracing must be working before you run
agent-evaluation. Complete verification below first.
mlflow.search_traces() or MlflowClient().search_traces() to check that traces appear in the experiment:import mlflow
traces = mlflow.search_traces(experiment_ids=["<experiment_id>"])
print(f"Found {len(traces)} trace(s)")
assert len(traces) > 0, "No traces were logged — check tracking URI and experiment settings"
3. Report the result — tell the user how many traces were found and confirm tracing is working
Log user feedback on traces for evaluation, debugging, and fine-tuning. Essential for identifying quality issues in production.
See references/feedback-collection.md for:
mlflow.log_feedback()See references/production.md for:
mlflow-tracing)See references/advanced-patterns.md for:
See references/distributed-tracing.md for:
Weekly Installs
86
Repository
GitHub Stars
18
First Seen
Feb 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli85
github-copilot85
codex84
opencode83
kimi-cli82
amp82
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
50,900 周安装
RCSB PDB 数据库 API 使用指南:搜索、下载与分析蛋白质三维结构数据
185 周安装
免费在线表情包生成器 | 使用 memegen.link API 快速创建和自定义表情包
184 周安装
COBRApy Python库:代谢模型约束性重构与分析工具,用于系统生物学研究
186 周安装
Solid JSON 渲染库 | 细粒度响应式组件树 | Vercel Labs @json-render/solid
187 周安装
Android XML 转 Compose 迁移指南:布局映射、状态迁移与增量策略
189 周安装
Payload CMS 翻译生成指南:核心与插件翻译自动化配置教程
191 周安装