phoenix-tracing
Original:🇺🇸 English
Translated
OpenInference semantic conventions and instrumentation for Phoenix AI observability. Use when implementing LLM tracing, creating custom spans, or deploying to production.
2installs
Sourcearize-ai/phoenix
Added on
NPX Install
npx skill4agent add arize-ai/phoenix phoenix-tracingTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Phoenix Tracing
Comprehensive guide for instrumenting LLM applications with OpenInference tracing in Phoenix. Contains rule 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
Rule Categories
| Priority | Category | Description | Prefix |
|---|---|---|---|
| 1 | Setup | Installation and configuration | |
| 2 | Instrumentation | Auto and manual tracing | |
| 3 | Span Types | 9 span kinds with attributes | |
| 4 | Organization | Projects and sessions | |
| 5 | Enrichment | Custom metadata | |
| 6 | Production | Batch processing, masking | |
| 7 | Feedback | Annotations and evaluation | |
Quick Reference
1. Setup (START HERE)
- - Install arize-phoenix-otel, configure endpoint
setup-python - - Install @arizeai/phoenix-otel, configure endpoint
setup-typescript
2. Instrumentation
- - Auto-instrument OpenAI, LangChain, etc.
instrumentation-auto-python - - Auto-instrument supported frameworks
instrumentation-auto-typescript - - Custom spans with decorators
instrumentation-manual-python - - Custom spans with wrappers
instrumentation-manual-typescript
3. Span Types (with full attribute schemas)
- - LLM API calls (model, tokens, messages, cost)
span-llm - - Multi-step workflows and pipelines
span-chain - - Document retrieval (documents, scores)
span-retriever - - Function/API calls (name, parameters)
span-tool - - Multi-step reasoning agents
span-agent - - Vector generation
span-embedding - - Document re-ranking
span-reranker - - Safety checks
span-guardrail - - LLM evaluation
span-evaluator
4. Organization
- /
projects-python- Group traces by applicationprojects-typescript - /
sessions-python- Track conversationssessions-typescript
5. Enrichment
- /
metadata-python- Custom attributesmetadata-typescript
6. Production (CRITICAL)
- /
production-python- Batch processing, PII maskingproduction-typescript
7. Feedback
- - Feedback concepts
annotations-overview - /
annotations-python- Add feedback to spansannotations-typescript
Reference Files
- - Traces, spans, attributes basics
fundamentals-overview - - Required fields per span type
fundamentals-required-attributes - - Common attributes (user.id, session.id)
fundamentals-universal-attributes - - JSON flattening rules
fundamentals-flattening - - Chat message format
attributes-messages - - Custom metadata schema
attributes-metadata - - Agent workflow attributes
attributes-graph - - Error tracking
attributes-exceptions
Common Attributes
| Attribute | Purpose | Example |
|---|---|---|
| Span type (required) | |
| Operation input | JSON or text |
| Operation output | JSON or text |
| User identifier | |
| Conversation ID | |
| Model identifier | |
| Token usage | |
| Tool/function name | |
Common Workflows
Quick Start:
- → Install and configure
setup-{lang} - → Enable auto-instrumentation
instrumentation-auto-{lang} - Check Phoenix for traces
Custom Spans:
- → Install
setup-{lang} - → Add decorators/wrappers
instrumentation-manual-{lang} - → Reference attributes
span-{type}
Production: → Configure batching and masking
production-{lang}How to Use
Read individual rule files in for detailed explanations and examples:
rules/rules/setup-python.md
rules/instrumentation-manual-typescript.md
rules/span-llm.mdUse file prefixes to find what you need:
bash
ls rules/span-* # Span type specifications
ls rules/*-python.md # Python guides
ls rules/*-typescript.md # TypeScript guidesReferences
Phoenix Documentation:
Python API Documentation:
- Python OTEL Package - API reference
arize-phoenix-otel - Python Client Package - API reference
arize-phoenix-client
TypeScript API Documentation:
- TypeScript Packages - ,
@arizeai/phoenix-otel, and other TypeScript packages@arizeai/phoenix-client