phoenix-tracing
Audited by Runlayer on Feb 22, 2026
Malicious tool definition detected
## Data Masking (PII Protection) **Environment variables:** ```bash export OPENINFERENCE_HIDE_INPUTS=true # Hide input.value export OPENINFERENCE_HIDE_OUTPUTS=true # Hide output.value export OPENINFERENCE_HIDE_INPUT_MESSAGES=true # Hide LLM input messages export OPENINFERENCE_HIDE_OUTPUT_MESSAGES=true # Hide LLM output messages export OPENINFERENCE_HIDE_INPUT_IMAGES=true # Hide image content export OPENINFERENCE_HIDE_INPUT_TEXT=true # Hide embedding text export OPENINFE
Malicious tool definition detected
Tool: rules/fundamentals-universal-attributes.md Description: # Universal Attributes This document covers attributes that can be used on any span kind in OpenInference.
Malicious tool definition detected
## Supported Frameworks **Python:** - LLM SDKs: OpenAI, Anthropic, Bedrock, Mistral, Vertex AI, Groq, Ollama - Frameworks: LangChain, LlamaIndex, DSPy, CrewAI, Instructor, Haystack - Install: `pip install openinference-instrumentation-{name}` ## Setup **Install and enable:** ```bash pip install arize-phoenix-otel pip install openinference-instrumentation-openai # Add others as needed ``` ```python from phoenix.otel import register register(project_name="my-app", auto_instrument=True) # Discove
Malicious tool definition detected
Tool: rules/instrumentation-auto-typescript.md Description: # Auto-Instrumentation (TypeScript) Automatically create spans for LLM calls without code changes.
Malicious tool definition detected
Tool: rules/instrumentation-manual-python.md Description: # Manual Instrumentation (Python) Add custom spans using decorators or context managers for fine-grained tracing control.
Malicious tool definition detected
``` ## Combined (using_attributes) ```python from openinference.instrumentation import using_attributes with using_attributes( session_id="my-session-id", user_id="my-user-id", metadata={"environment": "production"}, tags=["prod", "v2"], prompt_template="Answer: {question}", prompt_template_version="v1.0", prompt_template_variables={"question": "What is Phoenix?"}, ): # All attributes applied to spans in this context ...
Malicious tool definition detected
Tool: rules/metadata-typescript.md Description: # Phoenix Tracing: Custom Metadata (TypeScript) Add custom attributes to spans for richer observability.
Malicious tool definition detected
Tool: rules/production-typescript.md Description: # Phoenix Tracing: Production Guide (TypeScript) **CRITICAL: Configure batching, data masking, and span filtering for production deployment.** ## Metadata | Attribute | Value | |-----------|-------| | Priority | Critical - production readiness | | Impact | Security, Performance | | Setup Time | 5-15 min | ## Batch Processing **Enable batch processing for production efficiency.** Batching reduces network overhead by sending spans in groups rather
Malicious tool definition detected
Tool: rules/projects-python.md Description: # Phoenix Tracing: Projects (Python) **Organize traces by application using projects (Phoenix's top-level grouping).** ## Overview Projects group traces for a single application or experiment.
Malicious tool definition detected
Query traces by `session.id` in Phoenix to see all interactions ## Implementation (Best Practice) ### 1. Setup (instrumentation.ts) ```typescript import { register } from "@arizeai/phoenix-otel"; import { randomUUID } from "node:crypto"; // Initialize Phoenix register({ projectName: "your-app", url: process.env.PHOENIX_COLLECTOR_ENDPOINT || "http://localhost:6006", apiKey: process.env.PHOENIX_API_KEY, batch: true, }); // Generate and export session ID export const SESSION_ID = randomUUID(); ```
Malicious tool definition detected
Configure via environment variables: ```bash export OTEL_BSP_SCHEDULE_DELAY=5000 # Batch every 5s export OTEL_BSP_MAX_QUEUE_SIZE=2048 # Queue 2048 spans export OTEL_BSP_MAX_EXPORT_BATCH_SIZE=512 # Send 512 spans/batch ``` **Link:** https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/ ## Verification 1.
Malicious tool definition detected
## Configuration ```typescript import { register } from "@arizeai/phoenix-otel"; register({ projectName: "my-app", url: "http://localhost:6006", apiKey: process.env.PHOENIX_API_KEY, batch: true }); ``` **Environment variables:** ```bash export PHOENIX_API_KEY="your-api-key" export PHOENIX_COLLECTOR_ENDPOINT="http://localhost:6006" export PHOENIX_PROJECT_NAME="my-app" ``` ## ESM vs CommonJS **CommonJS (automatic):** ```javascript const { register } = require("@arizeai/phoenix-otel"); register({ p
Malicious tool definition detected
Tool: rules/span-chain.md Description: # CHAIN Spans ## Purpose CHAIN spans represent orchestration layers in your application (LangChain chains, custom workflows, application entry points).
Malicious tool definition detected
"embedding.embeddings.1.embedding.vector": "[0.6, 0.7, 0.8, ..., 0.9]" } ``` ### Vector Format Vectors stored as JSON array strings: - Dimensions: Typically 384, 768, 1536, or 3072 - Format: `"[0.123, -0.456, 0.789, ...]"` - Precision: Usually 3-6 decimal places **Storage Considerations:** - Large vectors can significantly increase trace size - Consider omitting vectors in production (keep `embedding.text` for debugging) - Use separate vector database for actual similarity search ## Examples ###
Malicious tool definition detected
Tool: rules/span-evaluator.md Description: # EVALUATOR Spans ## Purpose EVALUATOR spans represent quality assessment operations (answer relevance, faithfulness, hallucination detection).
Malicious tool definition detected
Tool: rules/span-guardrail.md Description: # GUARDRAIL Spans ## Purpose GUARDRAIL spans represent safety and policy checks (content moderation, PII detection, toxicity scoring).
Malicious tool definition detected
Tool: rules/span-llm.md Description: # LLM Spans Represent calls to language models (OpenAI, Anthropic, local models, etc.).
Malicious tool definition detected
"reranker.input_documents.0.document.score": 0.7, "reranker.input_documents.1.document.id": "doc_B", "reranker.input_documents.1.document.score": 0.9, "reranker.output_documents.0.document.id": "doc_B", "reranker.output_documents.0.document.score": 0.95, "reranker.output_documents.1.document.id": "doc_A", "reranker.output_documents.1.document.score": 0.85 } ``` In this example: - Input: doc_B (0.9) ranked higher than doc_A (0.7) - Output: doc_B still highest but both scores increased - Reranker
Malicious tool definition detected
Preserve retrieval order in your flattened attributes. ### Large Document Handling For very long documents: - Consider truncating `document.content` to first N characters - Store full content in separate document store - Use `document.id` to reference full content ## Examples ### Basic Vector Search ```json { "openinference.span.kind": "RETRIEVER", "input.value": "What is machine learning?", "retrieval.documents.0.document.id": "doc_123", "retrieval.documents.0.document.content": "Machine learni
Malicious tool definition detected
Tool: rules/span-tool.md Description: # TOOL Spans ## Purpose TOOL spans represent external tool or function invocations (API calls, database queries, calculators, custom functions).
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Passed Files (6)Click to expand
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan
Tool passed security scan