AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

phoenix-tracing

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

Original source
github
License
MIT
Pinned revision
5269f7ea2d6c3a9bfda5ed878b6726cf509121fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read github--phoenix-tracing at revision 5269f7ea2d6c3a9bfda5ed878b6726cf509121fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 32

references/fundamentals-universal-attributes.md

Universal Attributes

This document covers attributes that can be used on any span kind in OpenInference.

Overview

These attributes can be used on any span kind to provide additional context, tracking, and metadata.

Input/Output

| Attribute | Type | Description | | ------------------ | ------ | ---------------------------------------------------- | | input.value | String | Input to the operation (prompt, query, document) | | input.mime_type | String | MIME type (e.g., "text/plain", "application/json") | | output.value | String | Output from the operation (response, vector, result) | | output.mime_type | String | MIME type of output |

Why Capture I/O?

Always capture input/output for evaluation-ready spans:

  • Phoenix evaluators (faithfulness, relevance, Q&A correctness) require input.value and output.value
  • Phoenix UI displays I/O prominently in trace views for debugging
  • Enables exporting I/O for creating fine-tuning datasets
  • Provides complete context for analyzing agent behavior

Example attributes:

{
  "openinference.span.kind": "CHAIN",
  "input.value": "What is the weather?",
  "input.mime_type": "text/plain",
  "output.value": "I don't have access to weather data.",
  "output.mime_type": "text/plain"
}

See language-specific implementation:

  • TypeScript: instrumentation-manual-typescript.md
  • Python: instrumentation-manual-python.md

Session and User Tracking

| Attribute | Type | Description | | ------------ | ------ | ---------------------------------------------- | | session.id | String | Session identifier for grouping related traces | | user.id | String | User identifier for per-user analysis |

Example:

{
  "openinference.span.kind": "LLM",
  "session.id": "session_abc123",
  "user.id": "user_xyz789"
}

Metadata

| Attribute | Type | Description | | ---------- | ------ | ------------------------------------------ | | metadata | string | JSON-serialized object of key-value pairs |

Example:

{
  "openinference.span.kind": "LLM",
  "metadata": "{\"environment\": \"production\", \"model_version\": \"v2.1\", \"cost_center\": \"engineering\"}"
}