Generated banner for Phoenix Tracing
Generated logo for Phoenix Tracing

Phoenix Tracing

GitHubOfficialFirst committed by jimbobbennettDistributed by GitHub

  • Skill
  • Tool integration
  • Data and AI
  • Apache-2.0
  • Low risk

From the author

OpenInference semantic conventions and instrumentation for Phoenix AI observability. Use when implementing LLM tracing, creating custom spans, or deploying to production.
— the description by jimbobbennett

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Phoenix Tracing provides a structured framework for implementing observability in LLM-based applications. It covers the full lifecycle of trace management, including setup, auto and manual instrumentation, span type definitions, and production deployment. The skill offers specific guidance for both Python and TypeScript environments, enabling developers to capture detailed telemetry for LLM calls, retrieval processes, agent reasoning, and evaluation feedback.

What it does

  • Provides setup instructions for Python and TypeScript SDKs.
  • Defines OpenInference semantic conventions for various span types like LLM, retriever, and agent.
  • Supports both auto-instrumentation and manual custom span creation.
  • Enables feedback collection through annotations on traces, spans, documents, and sessions.
  • Offers guidance on production concerns such as batch processing and PII masking.
  • Facilitates organization of trace data by projects and user sessions.

When to use it

  • When you need to implement observability for LLM applications.
  • When you want to track multi-step workflows or agent reasoning processes.
  • When you need to add custom metadata or feedback annotations to your traces.
  • When preparing your LLM application for production monitoring.
  • When you need to ensure your instrumentation follows OpenInference standards.

Advantages

  • Standardized tracing using OpenInference conventions.
  • Supports both Python and TypeScript ecosystems.
  • Granular control over span types and custom attributes.
  • Built-in support for human, LLM, and code-based feedback annotations.
  • Comprehensive documentation for both development and production deployment.

Usage examples

“How do I set up Phoenix tracing in my Python project?”
The agent provides the installation steps for the arize-phoenix-otel package and demonstrates how to configure the endpoint to begin capturing traces.
“How can I add a custom span for an LLM call in TypeScript?”
The agent guides you through using the @arizeai/phoenix-otel library to wrap your LLM API calls with the appropriate span attributes.
“How do I add human feedback to a specific span?”
The agent shows the code pattern for using the client.spans.add_span_annotation method, including how to specify the label, score, and explanation.
“What are the best practices for production tracing?”
The agent explains how to implement batch processing and PII masking to ensure efficient and secure trace data collection in a production environment.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/github/phoenix-tracing/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip phoenix-tracing.zip -d .agents/skills

Documentation by jimbobbennett

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

PriorityCategoryDescriptionPrefix
1SetupInstallation and configurationsetup-*
2InstrumentationAuto and manual tracinginstrumentation-*
3Span Types9 span kinds with attributesspan-*
4OrganizationProjects and sessionsprojects-*, sessions-*
5EnrichmentCustom metadatametadata-*
6ProductionBatch processing, maskingproduction-*
7FeedbackAnnotations and evaluationannotations-*

Quick Reference

1. Setup (START HERE)
2. Instrumentation
3. Span Types (with full attribute schemas)
4. Organization
5. Enrichment
6. Production (CRITICAL)
7. Feedback
Reference Files

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

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

Reading Order:

  1. Start with setup-{lang} for your language

  2. Choose instrumentation-auto-{lang} OR instrumentation-manual-{lang}

  3. Reference span-{type} files as needed for specific operations

  4. See fundamentals-* files for attribute specifications

References

Phoenix Documentation:

Python API Documentation:

TypeScript API Documentation:

  • TypeScript Packages - @arizeai/phoenix-otel, @arizeai/phoenix-client, and other TypeScript packages

Files

references/instrumentation-manual-typescript.md

Manual Instrumentation (TypeScript)

Add custom spans using convenience wrappers or withSpan for fine-grained tracing control.

Setup

npm install @arizeai/phoenix-otel @arizeai/openinference-core
import { register } from "@arizeai/phoenix-otel";
register({ projectName: "my-app" });

Quick Reference

Span KindMethodUse Case
CHAINtraceChainWorkflows, pipelines, orchestration
AGENTtraceAgentMulti-step reasoning, planning
TOOLtraceToolExternal APIs, function calls
RETRIEVERwithSpanVector search, document retrieval
LLMwithSpanLLM API calls (prefer auto-instrumentation)
EMBEDDINGwithSpanEmbedding generation
RERANKERwithSpanDocument re-ranking
GUARDRAILwithSpanSafety checks, content moderation
EVALUATORwithSpanLLM evaluation

Convenience Wrappers

import { traceChain, traceAgent, traceTool } from "@arizeai/openinference-core";

// CHAIN - workflows
const pipeline = traceChain(
  async (query: string) => {
    const docs = await retrieve(query);
    return await generate(docs, query);
  },
  { name: "rag-pipeline" }
);

// AGENT - reasoning
const agent = traceAgent(
  async (question: string) => {
    const thought = await llm.generate(`Think: ${question}`);
    return await processThought(thought);
  },
  { name: "my-agent" }
);

// TOOL - function calls
const getWeather = traceTool(
  async (city: string) => fetch(`/api/weather/${city}`).then(r => r.json()),
  { name: "get-weather" }
);

withSpan for Other Kinds

import { withSpan, getInputAttributes, getRetrieverAttributes } from "@arizeai/openinference-core";

// RETRIEVER with custom attributes
const retrieve = withSpan(
  async (query: string) => {
    const results = await vectorDb.search(query, { topK: 5 });
    return results.map(doc => ({ content: doc.text, score: doc.score }));
  },
  {
    kind: "RETRIEVER",
    name: "vector-search",
    processInput: (query) => getInputAttributes(query),
    processOutput: (docs) => getRetrieverAttributes({ documents: docs })
  }
);

Options:

withSpan(fn, {
  kind: "RETRIEVER",              // OpenInference span kind
  name: "span-name",              // Span name (defaults to function name)
  processInput: (args) => {},     // Transform input to attributes
  processOutput: (result) => {},  // Transform output to attributes
  attributes: { key: "value" }    // Static attributes
});

Capturing Input/Output

Always capture I/O for evaluation-ready spans. Use getInputAttributes and getOutputAttributes helpers for automatic MIME type detection:

import {
  getInputAttributes,
  getOutputAttributes,
  withSpan,
} from "@arizeai/openinference-core";

const handleQuery = withSpan(
  async (userInput: string) => {
    const result = await agent.generate({ prompt: userInput });
    return result;
  },
  {
    name: "query.handler",
    kind: "CHAIN",
    // Use helpers - automatic MIME type detection
    processInput: (input) => getInputAttributes(input),
    processOutput: (result) => getOutputAttributes(result.text),
  }
);

await handleQuery("What is 2+2?");

What gets captured:

{
  "input.value": "What is 2+2?",
  "input.mime_type": "text/plain",
  "output.value": "2+2 equals 4.",
  "output.mime_type": "text/plain"
}

Helper behavior:

  • Strings → text/plain

  • Objects/Arrays → application/json (automatically serialized)

  • undefined/null → No attributes set

Why this matters:

  • Phoenix evaluators require input.value and output.value

  • Phoenix UI displays I/O prominently for debugging

  • Enables exporting data for fine-tuning datasets

Custom I/O Processing

Add custom metadata alongside standard I/O attributes:

const processWithMetadata = withSpan(
  async (query: string) => {
    const result = await llm.generate(query);
    return result;
  },
  {
    name: "query.process",
    kind: "CHAIN",
    processInput: (query) => ({
      "input.value": query,
      "input.mime_type": "text/plain",
      "input.length": query.length,  // Custom attribute
    }),
    processOutput: (result) => ({
      "output.value": result.text,
      "output.mime_type": "text/plain",
      "output.tokens": result.usage?.totalTokens,  // Custom attribute
    }),
  }
);

See Also

Requirements and compatibility

Written for: GitHub Copilot

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

The author says: Requires Phoenix server. Python skills need arize-phoenix-otel; TypeScript skills need @arizeai/phoenix-otel.

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

First committed by
GitHub avatar of jimbobbennettjimbobbennett
Publisher
GitHub (Official)
Distributed by
GitHub
Source
github/awesome-copilot · skills/phoenix-tracing · commit 797337f
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (written by AutoGineer)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
jimbobbennett, stbenjam

AutoGineer is not affiliated with or endorsed by jimbobbennett or GitHub.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download phoenix-tracing.zip