phoenix-tracing
arize-ai/phoenix
OpenInference tracing and instrumentation for Phoenix LLM observability.
What is phoenix-tracing?
Phoenix Tracing provides semantic conventions and instrumentation libraries for capturing LLM application traces in Phoenix. Use it when implementing production LLM tracing, creating custom spans for multi-step workflows, or analyzing agent behavior with structured observability.
- Auto-instrument popular frameworks (OpenAI, LangChain, etc.) or manually create custom spans with decorators/wrappers
- Define 9 span types (LLM, chain, retriever, tool, agent, embedding, reranker, guardrail, evaluator) with OpenInference attribute schemas
- Organize traces by project and session for conversation tracking and multi-tenant applications
- Add custom metadata and universal attributes (user.id, session.id) following OpenInference conventions
- Implement production patterns including batch processing, PII masking, and feedback annotations
- Query and analyze trace data through Phoenix server with structured attributes
How to install phoenix-tracing
npx skills add https://github.com/arize-ai/phoenix --skill phoenix-tracing- Phoenix server running and accessible at a configured endpoint
- Python: arize-phoenix-otel package installed
- TypeScript: @arizeai/phoenix-otel package installed
How to use phoenix-tracing
- 1.Choose your language (Python or TypeScript) and follow setup-{lang} to install dependencies and configure the Phoenix endpoint
- 2.Select instrumentation-auto-{lang} for framework auto-instrumentation (OpenAI, LangChain, etc.) or instrumentation-manual-{lang} for custom spans
- 3.Reference the appropriate span-{type} file (span-llm, span-chain, span-retriever, etc.) to add required and optional attributes for your operations
- 4.Use sessions-{lang} to group related traces by conversation or user session if needed
- 5.For production deployments, apply patterns from production-{lang} for batch processing and PII masking
- 6.Optionally add feedback annotations using annotations-{lang} to evaluate and score spans after execution
Use cases
- Instrument an OpenAI-based chatbot to trace API calls, token usage, and latency across requests
- Create custom spans for a multi-step RAG pipeline to track retrieval, reranking, and LLM generation separately
- Add session tracking to group related traces from a conversation thread for debugging and analysis
- Mask sensitive data in production traces before sending to Phoenix to comply with data privacy requirements
- Evaluate LLM outputs by attaching feedback annotations and computing metrics across trace populations
- LLM application developers building production systems with observability requirements
- ML engineers implementing tracing for multi-step agent workflows and RAG pipelines
- DevOps and platform teams deploying LLM applications with structured logging and monitoring
- Data scientists analyzing LLM behavior through trace data and feedback annotations
phoenix-tracing FAQ
Not necessarily. Auto-instrumentation (instrumentation-auto-{lang}) works with popular frameworks like OpenAI and LangChain without code changes. For custom operations, use manual instrumentation with decorators (Python) or wrappers (TypeScript).
Choose based on your operation: span-llm for LLM API calls, span-chain for multi-step workflows, span-retriever for document retrieval, span-tool for function calls, and span-agent for reasoning agents. See span-* reference files for full attribute schemas.
Use sessions-{lang} to assign a session ID to related traces. This groups traces from a single conversation or user interaction for easier analysis and debugging.
Yes. See production-{lang} for PII masking patterns and batch processing strategies for production deployments.
Auto-instrumentation automatically captures traces from supported frameworks with zero code changes. Manual instrumentation lets you create custom spans for operations not covered by auto-instrumentation using decorators or wrappers.
Full instructions (SKILL.md)
Source of truth, from arize-ai/phoenix.
name: phoenix-tracing description: OpenInference semantic conventions and instrumentation for Phoenix AI observability. Use when implementing LLM tracing, creating custom spans, or deploying to production. license: Apache-2.0 compatibility: Requires Phoenix server. Python skills need arize-phoenix-otel; TypeScript skills need @arizeai/phoenix-otel. metadata: author: oss@arize.com version: "1.0.0" languages: "Python, TypeScript"
Phoenix Tracing
Comprehensive guide for instrumenting LLM applications with OpenInference tracing in Phoenix. Contains reference files covering setup, instrumentation, span types, and production deployment.
When to Apply
Reference these guidelines when:
- Setting up Phoenix tracing (Python or TypeScript)
- Creating custom spans for LLM operations
- Adding attributes following OpenInference conventions
- Deploying tracing to production
- Querying and analyzing trace data
Reference Categories
| Priority | Category | Description | Prefix |
|---|---|---|---|
| 1 | Setup | Installation and configuration | setup-* |
| 2 | Instrumentation | Auto and manual tracing | instrumentation-* |
| 3 | Span Types | 9 span kinds with attributes | span-* |
| 4 | Organization | Projects and sessions | projects-*, sessions-* |
| 5 | Enrichment | Custom metadata | metadata-* |
| 6 | Production | Batch processing, masking | production-* |
| 7 | Feedback | Annotations and evaluation | annotations-* |
Quick Reference
1. Setup (START HERE)
- setup-python - Install arize-phoenix-otel, configure endpoint
- setup-typescript - Install @arizeai/phoenix-otel, configure endpoint
2. Instrumentation
- instrumentation-auto-python - Auto-instrument OpenAI, LangChain, etc. (also covers OTel GenAI native instrumentation)
- instrumentation-auto-typescript - Auto-instrument supported frameworks
- instrumentation-manual-python - Custom spans with decorators
- instrumentation-manual-typescript - Custom spans with wrappers
- instrumentation-atif-python - Import ATIF agent trajectories (Claude Code, OpenHands, Codex, etc.)
3. Span Types (with full attribute schemas)
- span-llm - LLM API calls (model, tokens, messages, cost)
- span-chain - Multi-step workflows and pipelines
- span-retriever - Document retrieval (documents, scores)
- span-tool - Function/API calls (name, parameters)
- span-agent - Multi-step reasoning agents
- span-embedding - Vector generation
- span-reranker - Document re-ranking
- span-guardrail - Safety checks
- span-evaluator - LLM evaluation
4. Organization
- projects-python / projects-typescript - Group traces by application
- sessions-python / sessions-typescript - Track conversations
5. Enrichment
- metadata-python / metadata-typescript - Custom attributes
6. Production (CRITICAL)
- production-python / production-typescript - Batch processing, PII masking
7. Feedback
- annotations-overview - Feedback concepts
- annotations-python / annotations-typescript - Add feedback to spans
Reference Files
- fundamentals-overview - Traces, spans, attributes basics
- fundamentals-required-attributes - Required fields per span type
- fundamentals-universal-attributes - Common attributes (user.id, session.id)
- fundamentals-flattening - JSON flattening rules
Common Workflows
- Quick Start: setup-{lang} → instrumentation-auto-{lang} → Check Phoenix
- Custom Spans: setup-{lang} → instrumentation-manual-{lang} → span-{type}
- Session Tracking: sessions-{lang} for conversation grouping patterns
- Production: production-{lang} for batching, masking, and deployment
How to Use This Skill
Navigation Patterns:
# 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
Reading Order:
- Start with setup-{lang} for your language
- Choose instrumentation-auto-{lang} OR instrumentation-manual-{lang}
- Reference span-{type} files as needed for specific operations
- See fundamentals-* files for attribute specifications
References
Phoenix Documentation:
Python API Documentation:
- Python OTEL Package -
arize-phoenix-otelAPI reference - Python Client Package -
arize-phoenix-clientAPI reference
TypeScript API Documentation:
- TypeScript Packages -
@arizeai/phoenix-otel,@arizeai/phoenix-client, and other TypeScript packages
Related skills
More from arize-ai/phoenix and the wider catalog.

phoenix-cli
Debug LLM applications from the terminal using Phoenix CLI—fetch traces, spans, sessions, and run GraphQL queries.

phoenix-evals
Build and run evaluators for AI/LLM applications using Phoenix.

swiftui-design-principles
Design principles for building polished, native-feeling SwiftUI apps and widgets. Use this skill when creating or modifying SwiftUI views, iOS widgets (WidgetKit), or any native Apple UI. Ensures proper spacing, typography, colors, and widget implementations that look and feel like quality apps rather than AI-generated slop.
sd25-pe
Agent skill from arkdocs-en.tos-ap-southeast-1.volces.com.
sd25-pe
Agent skill from arkdocs.tos-cn-beijing.volces.com.

b2b-brand-marketing
Build B2B brand strategy with thought leadership, trust signals, and multi-stakeholder messaging for enterprise sales cycles.