phoenix-integration-snippets

Generates onboarding code snippets for Phoenix tracing integrations and wires them into the onboarding UI.

11.3k|1.1k|Updated Nov 9, 2022
One-click install
npx skills add https://github.com/Arize-ai/phoenix --skill phoenix-integration-snippets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phoenix-integration-snippets
Source: https://github.com/Arize-ai/phoenix/tree/main/.agents/skills/phoenix-integration-snippets
Command: npx skills add https://github.com/Arize-ai/phoenix --skill phoenix-integration-snippets

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a new framework integration to the Phoenix project onboarding UI requires writing correct install and implementation snippets for Python and TypeScript, testing them against a live Phoenix instance, and registering them in the React codebase. This Skill standardizes that entire workflow so snippets work verbatim for end users.

Core Features & Use Cases

  • Snippet Generation: Produces install package lists and 10-20 line implementation snippets for SDKs like OpenAI, LangChain, and Vercel AI SDK in Python and TypeScript.
  • UI Registration: Guides adding implementation functions to js/app/src/components/project/integrationSnippets/ and registering entries in integrationRegistry.tsx.
  • Verification Workflow: Enforces isolated per-integration test environments, fresh Phoenix project names, and trace validation checklists before wiring into the UI.
  • Use Case: When adding onboarding support for a new framework like Mastra, use this Skill to research the OpenInference repo, generate the snippets, confirm traces appear in Phoenix, and register the integration.

Quick Start

Generate Phoenix onboarding snippets for the LangChain integration, test them against a local Phoenix instance, and wire them into the project onboarding UI.

Frequently Asked Questions about phoenix-integration-snippets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new framework integration to the Phoenix onboarding UI?

Add an implementation function in js/app/src/components/project/integrationSnippets/ following existing conventions, then register it in the ONBOARDING_INTEGRATIONS list in integrationRegistry.tsx. Test the snippet verbatim against Phoenix first and verify all docsHref and githubHref URLs return HTTP 200.

How do I write Phoenix tracing snippets for Python frameworks?

Use register() with auto_instrument=True and place SDK imports after the register() call. Order packages as phoenix-otel first, then the instrumentation package, then the SDK, and include any separately required model provider SDK explicitly.

Does the Phoenix onboarding snippet need an explicit endpoint for TypeScript exporters?

Verbatim exporters like @mastra/arize's ArizeExporter or a bare OTLPTraceExporter must receive the full OTLP URL built from PHOENIX_COLLECTOR_ENDPOINT with /v1/traces appended. register()-based snippets read the environment variable themselves and need no endpoint.

Why do Phoenix integration snippet tests show no traces?

Missing traces usually come from omitting the OTLP endpoint on verbatim exporters, cross-contamination from other instrumentors in a shared environment, or reusing an existing Phoenix project that masks failures. Test in a fresh environment with only the snippet's packages and a fresh project name.

What languages does Phoenix integration snippet generation support?

The Skill supports Python and TypeScript snippet generation. TypeScript snippets use ESM imports where ordering does not matter, but short-lived scripts require await provider.forceFlush() to ensure spans are exported before exit.