mcpField
P
phoenix-tracing

phoenix-tracing

github.com/arize-ai开发12.0k1.7k 次安装今天更新
代码仓库

关于 phoenix-tracing

phoenix-tracing 是用于在 Phoenix 中为 LLM 应用添加 OpenInference 跟踪的参考技能,面向开发者,涵盖 Python 和 TypeScript 的配置、Span 定义及生产环境跟踪分析。

主要功能

  1. 01Python 和 TypeScript 配置指南
  2. 02自动与手动插桩
  3. 03Span 类型与属性规范
  4. 04项目、会话与元数据
  5. 05生产环境批处理与 PII 屏蔽
  6. 06Span 标注与反馈

适用场景

  1. 01为 Python 或 TypeScript LLM 应用添加跟踪
  2. 02为 LLM 操作创建自定义 Span
  3. 03按项目或对话整理跟踪数据
  4. 04准备生产环境的跟踪采集

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/arize-ai/phoenix --skill phoenix-tracing

安装后在 Claude Code 中输入/phoenix-tracing确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

README.md
references/
annotations-overview.md
annotations-python.md
annotations-typescript.md
fundamentals-flattening.md
fundamentals-overview.md
fundamentals-required-attributes.md
fundamentals-universal-attributes.md
instrumentation-atif-python.md
instrumentation-auto-python.md
instrumentation-auto-typescript.md
instrumentation-manual-python.md
instrumentation-manual-typescript.md
metadata-python.md
metadata-typescript.md
production-python.md
production-typescript.md
projects-python.md
projects-typescript.md
sessions-python.md
sessions-typescript.md
setup-python.md
setup-typescript.md
span-agent.md
span-chain.md
span-decision.md
span-embedding.md
span-evaluator.md
span-guardrail.md
span-llm.md

详细介绍

Phoenix 跟踪

在 Phoenix 中使用 OpenInference 跟踪对 LLM 应用进行埋点的完整指南。包含涵盖设置、埋点、Span 类型和生产环境部署的参考文件。

适用场景

在以下情况下请参考这些指南:

  • 设置 Phoenix 跟踪(Python 或 TypeScript)
  • 为 LLM 操作创建自定义 Span
  • 按照 OpenInference 约定添加属性
  • 将跟踪部署到生产环境
  • 查询和分析跟踪数据

参考类别

优先级类别描述前缀
1设置安装和配置setup-*
2埋点自动和手动跟踪instrumentation-*
3Span 类型9 种 Span 类型及其属性span-*
4组织方式项目和会话projects-*、sessions-*
5丰富数据自定义元数据metadata-*
6生产环境批处理、脱敏production-*
7反馈标注和评估annotations-*

快速参考

1. 设置(从这里开始)
2. 埋点
3. Span 类型(含完整属性架构)
4. 组织方式
5. 丰富数据
6. 生产环境(至关重要)
7. 反馈
参考文件

常见工作流

  • 快速开始:setup-{lang} → instrumentation-auto-{lang} → 检查 Phoenix
  • 自定义 Span:setup-{lang} → instrumentation-manual-{lang} → span-{type}
  • 会话追踪:使用 sessions-{lang} 了解对话分组模式
  • 生产环境:使用 production-{lang} 了解批处理、脱敏和部署

如何使用此技能

导航模式:

# By category prefix
references/setup-*              # Installation and configuration
references/instrumentation-*    # Auto and manual tracing
references/span-*               # Span type specifications
references/sessions-*           # Session tracking
references/production-*         # Production deployment
references/fundamentals-*       # Core concepts

# By language
references/*-python.md          # Python implementations
references/*-typescript.md      # TypeScript implementations

阅读顺序:

  1. 从适用于你的语言的 setup-{lang} 开始
  2. 选择 instrumentation-auto-{lang} 或 instrumentation-manual-{lang}
  3. 根据具体操作需要,参考 span-{type} 文件
  4. 查看 fundamentals-* 文件了解属性规范

参考资料

Phoenix 文档:

Python API 文档:

TypeScript API 文档:

  • TypeScript 包 - @arizeai/phoenix-otel、@arizeai/phoenix-client 及其他 TypeScript 包

评论

支持 Markdown