mcpField
P
phoenix-tracing

phoenix-tracing

github.com/github开发40.6k1.0k 次安装1 天前更新
代码仓库

关于 phoenix-tracing

phoenix-tracing 是一份在 Phoenix 中使用 OpenInference 为 LLM 应用添加追踪的参考技能,面向 Python 和 TypeScript 开发者,涵盖配置、Span 规范、生产部署与追踪分析。

主要功能

  1. 01Python 和 TypeScript 配置指南
  2. 02自动与手动插桩
  3. 03九类 Span 及属性
  4. 04项目与会话组织
  5. 05生产批处理与 PII 遮蔽
  6. 06Span 标注与反馈

适用场景

  1. 01为 LLM 应用配置追踪
  2. 02为模型操作添加自定义 Span
  3. 03按项目或对话归组追踪
  4. 04准备生产环境追踪部署

安装

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

$npx skills add https://github.com/github/awesome-copilot --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-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-embedding.md
span-evaluator.md
span-guardrail.md
span-llm.md
span-reranker.md
span-retriever.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} 了解批处理、掩码和部署

如何使用本 Skill

导航模式:

# 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
references/attributes-*         # Attribute specifications

# 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-* 文件了解 attribute 规范

参考资料

Phoenix 文档:

Python API 文档:

TypeScript API 文档:

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

评论

支持 Markdown