Skip to content

Import from Phoenix

Do the shared setup first: an ingest key, pip install metergraphrelay, and a .env holding METERGRAPH_APP_TOKEN.

Spans whose OpenInference span_kind is LLM, from one or more Phoenix projects, read through GET /v1/projects/{project}/spans. CHAIN, TOOL, RETRIEVER and AGENT spans are not imported, and annotations and evals are never read.

Phoenix version13.15 or newer
CredentialsNone for a local Phoenix with authentication off. A PHOENIX_API_KEY when the server has authentication on
SelectorA project name or project id. --project is required
Hosthttp://localhost:6006 by default. Set PHOENIX_BASE_URL for a remote server

A local, unauthenticated Phoenix needs nothing beyond the Metergraph token.

.env
METERGRAPH_APP_TOKEN=<your ingest key>
# PHOENIX_BASE_URL=https://phoenix.example.com # default http://localhost:6006
# PHOENIX_API_KEY=<key> # only when Phoenix auth is on
  1. You need the project, by name or by id. --name narrows to particular span names if your instrumentation sets useful ones.

  2. metergraphrelay pull phoenix --project my-project \
    --since 2026-08-01T00:00:00Z --output phoenix.jsonl
    SelectorMeaning
    --projectRequired. A name or an id, and repeatable. Projects are read in order and share one --count cap
    --nameThe span’s own name. Repeatable, and any of the names matches
    --since / --untilBound the span’s start time. --since is inclusive, --until is exclusive and defaults to the moment the command started
    -n, --countCaps spans, never traces. Defaults to 100
    --routeOverrides the route on every row. Not a selector
  3. head -n 2 phoenix.jsonl
    metergraphrelay push phoenix.jsonl
  4. Open Traces in Metergraph. A standard OpenInference instrumentor sets neither route attribute and names the span after the SDK method, so a route reading ChatCompletion on every row is expected. Pass --route and pull again.

metergraphrelay sync phoenix --source-scope my-project \
--initial-since 2026-08-01T00:00:00Z --project my-project

Sync takes no --since, --until or -n: the server picks the window. It requires --project and --source-scope, and accepts --name, --initial-since, --max-window-seconds, --route and --allow-skipped. Give each --name selector set its own scope.

The full contract is on How ongoing sync works.

FieldWhere it comes from
RouteThe span’s metergraph.route attribute, then its gen_ai.operation.name, then the span’s own name, then phoenix/backfill. --route overrides all of them
TimestampThe span’s start_time
Provider and modelInferred from the span’s OpenInference attributes
TokensThe span’s OpenInference token attributes, including cache reads, cache writes and reasoning
LatencyComputed from the span’s start and end times
CostLeft empty on purpose. Phoenix prices spans in its own UI but the spans endpoint does not return the figure, so Metergraph prices the row from its catalog
Statuserror when the span’s status_code is ERROR, otherwise success
Error typeThe span’s status_message
ContentMessages rebuilt from the span’s attributes, including content block text, with the raw input and output values as a fallback
Tool namesExtracted from the span’s attributes
Trace, span and parent spanThe span’s OpenTelemetry context ids and parent_id
TagsThe project, under phoenix_project
  • Structured tool calls. Tool names come across, the call arguments do not.
  • Environment. Phoenix rows arrive with no environment set, so they fall outside any environment filter in the dashboard.
  • Function attribution, streaming detail, outcomes and repository identity, as on every import path.
  • CHAIN, TOOL, RETRIEVER and AGENT spans, annotations and evals, which are never read.
SymptomLikely causeWhat to do
HTTP 404 naming the projectThe name or id does not match a Phoenix projectCheck the project list in Phoenix
A warning about non-LLM spansPhoenix older than 13.15Upgrade, or accept that --name has no effect
Every route is ChatCompletionA standard instrumentor with no route attributePass --route
Cost is blank on every rowExpectedMetergraph prices these rows itself