agent/ directory and Eve compiles it into an app that runs on Vercel Functions. Eve emits Vercel AI SDK OpenTelemetry spans for every turn, model call, and tool execution. Phoenix captures them by registering the @arizeai/openinference-vercel span processor in Eve’s agent/instrumentation.ts.
Prerequisites
- Node.js 24+ (Eve’s CLI requires it)
- An Eve agent project (
npx eve@latest init my-agent) - A self-hosted Phoenix instance
Install
In your Eve project, add the Arize OpenInference processor and the OpenTelemetry packages it exports through:Connect to Phoenix
Run a self-hosted Phoenix instance, a local terminal, Kubernetes, etc., then point Eve at it by adding the following to your environment variables..local.env
Setup tracing
Eve auto-discoversagent/instrumentation.ts and runs it once at server startup, before any agent code. Create or edit this file to register an OpenTelemetry provider in the setup callback like so:
agent/instrumentation.ts
What the spanFilter and reparentOrphanedSpans options do
What the spanFilter and reparentOrphanedSpans options do
Both options act client-side, before spans are exported, and control which spans reach Phoenix and how each trace is rooted:
spanFilter: isOpenInferenceSpankeeps only the AI spans and drops the rest — the raw HTTP/fetch spans and Eve’s Vercel Workflow spans — so your Phoenix Traces view isn’t cluttered with non-AI spans.reparentOrphanedSpans: truere-roots any AI span left orphaned when the filter drops its parent, so it no longer points at a parent that was never exported (which would otherwise show up orphaned on the Phoenix Traces tab). It also recognizes Eve’sai.eve.turnwrapper as an AI-like root and tags itopeninference.span.kind = AGENT, so each turn shows up as a single clean agent root with its steps nested underneath.
OpenInferenceSimpleSpanProcessor exports each span synchronously as it ends, so it is safe on the short-lived serverless functions Eve runs on (no process-exit forceFlush to call). @arizeai/openinference-vercel translates the AI SDK spans into OpenInference before export.Run Eve
Start the Eve dev server, then open a session against the built-in HTTP channel:http://127.0.0.1:2000 by default (pass --port to change it). Open a session against the built-in HTTP channel:
continuationToken in the body and an x-eve-session-id header. Stream the session’s lifecycle events to watch the turn complete:
Expected output
Observe in Phoenix
New to reading traces in Phoenix? Here’s how to make sense of what Eve sends, step by step.-
Open your project. Go to localhost:6006 and click the project named
weather-agent(or whatever you set inPHOENIX_PROJECT_NAME). That opens the project’s Spans table. New spans show up within ~30 seconds of a turn. By default, only “Root spans” are shown. You can toggle on “All” to see all the spans. - Open a trace. Navigate to the “Traces” tab. Each row in the Traces table is one trace: a full agent turn, from the incoming message to the final reply. Click a row to open a span tree. Each span is one unit of work inside the turn (a model call, a tool run, a reasoning step), nested to show what ran inside what.
-
Tell spans apart by their kind, not their name. Eve emits Vercel AI SDK spans that follow OpenTelemetry’s GenAI convention, so nearly every span is named
gen_ai(orgen_ai.clientfor the model request) rather than something descriptive likeai.streamTextorai.toolCall. To know what a span actually is, read its span kind, a colored label Phoenix adds to denote what it is:- agent a step of the agent’s turn (its reasoning and orchestration).
- llm a model request (the
gen_ai.clientspan). Open it to see the prompt, the response, and token usage. - tool a tool execution, carrying a
tool.nameattribute such asget_weather.
-
Find the session context. Click any span and open its Attributes panel. Eve attaches session identifiers under the
ai.settings.context.eve.*prefix —ai.settings.context.eve.session.id,ai.settings.context.eve.turn.id,ai.settings.context.eve.step.index, andai.settings.context.eve.channel.kind— so you can trace any span back to the session and turn it came from. -
Read the tree top-down. At the top sits Eve’s
ai.eve.turnspan, shown as an agent root —reparentOrphanedSpansis promoting Eve’s turn wrapper to a clean root, one per turn. Beneath it you’ll see one or moregen_aispans, one for each step Eve took in the turn. A step’sgen_aispan often nests anothergen_aispan inside it, the outer one being the step itself (either a chain or agent span kind), and the inner one is the actual model request (with a span kind of llm, and sometimes namedgen_ai.client). So the “gen_aiinside agen_ai” you’re seeing is simply a step wrapping its model call. If the step ran a tool, that shows up as its owngen_aispan of kind tool carryingtool.name. Remember: the names are nearly allgen_ai, so lean on the kind label (and the nesting) to read what each one is.If you turn offspanFilter/reparentOrphanedSpansin instrumentation.ts, this tree will be cluttered with raw HTTP spans, or with thegen_aispans floating loose under no root; see the accordion under Setup tracing. - If no traces appear at all, see Troubleshooting.

Troubleshooting
- No traces in Phoenix. Confirm the file is exactly
agent/instrumentation.ts(Eve discovers it by path), and thatPHOENIX_COLLECTOR_ENDPOINTis set in the shell runningnpm run dev. If your Phoenix has auth enabled, also setPHOENIX_API_KEY. Enable OpenTelemetry debug logs withexport OTEL_LOG_LEVEL=debugand re-run. - Traces land in the wrong project. Phoenix routes spans to a project by the project-name resource attribute. Set
PHOENIX_PROJECT_NAME(or rely on the agent-name fallback above); without it, spans land in Phoenix’sdefaultproject. - Model auth errors. Eve routes models through AI Gateway, so set
AI_GATEWAY_API_KEY, or runvercel linkto use aVERCEL_OIDC_TOKEN. To skip the gateway, switch the agent to a direct provider model (e.g.@ai-sdk/openaiwithOPENAI_API_KEY). A brand-new AI Gateway key also fails until you add a payment method. The turn errors withGatewayInternalServerError: AI Gateway requires a valid credit card on file to service requests, even if you only plan to use the free credits. Add a card in your Vercel AI Gateway dashboard to unlock them. - Version mismatch. Pin the OpenTelemetry packages to Eve’s
@vercel/otelmajor:@vercel/otel@1.xrequires@opentelemetry/*1.x;@vercel/otel@2.xrequires2.x. Mismatches surface as silently missing traces. gen_aispans orphaned on the Traces tab. This happens whenspanFilter: isOpenInferenceSpandrops Eve’sai.eve.turnworkflow span without re-rooting its children, leaving the per-stepgen_aispans with no parent. SetreparentOrphanedSpans: trueas shown in Setup tracing for a single clean agent root per turn, and confirm@arizeai/openinference-vercelis 3.0.0 or later (the v3 major maps Eve’s v7 GenAI-convention spans and carries theai.eve.turnreparenting fix first shipped in 2.8.1).

