Skip to main content

get_traces — Retrieve Traces from a Project

April 1, 2026 Available in arize-phoenix 13.15.0+ (server), arize-phoenix-client 2.2.0+ (Python) client.traces.get_traces() retrieves traces for a project with filtering by time range, session, and sort order. The method handles cursor-based pagination automatically, collecting up to limit traces across multiple pages.
from phoenix.client import Client

client = Client()

# Fetch the 50 most recent traces
traces = client.traces.get_traces(
    project_identifier="my-project",
    limit=50,
)

# Filter by time range and include full span details
from datetime import datetime, timezone

traces = client.traces.get_traces(
    project_identifier="my-project",
    start_time=datetime(2026, 3, 1, tzinfo=timezone.utc),
    end_time=datetime(2026, 4, 1, tzinfo=timezone.utc),
    include_spans=True,
    limit=200,
)

# Filter by session ID
traces = client.traces.get_traces(
    project_identifier="my-project",
    session_id="my-session-id",
)
  • project_identifier — project name or ID
  • start_time / end_time — inclusive/exclusive bounds on trace start time
  • sort — sort by "start_time" (default) or "latency_ms"
  • order"asc" or "desc" (default "desc")
  • include_spans — when True, each trace includes full span detail; use with care on large trace sets
  • session_id — filter to a single session ID or a list of session IDs
  • limit — maximum traces to return; pagination is handled automatically (default 100)
An async variant is available on AsyncClient:
from phoenix.client import AsyncClient

client = AsyncClient()
traces = await client.traces.get_traces(
    project_identifier="my-project",
    limit=50,
)

Secrets Management REST API

April 1, 2026 Available in arize-phoenix 13.21.0+ Admin users can now store and manage encrypted LLM provider credentials (API keys) in Phoenix via a single REST endpoint. Secrets are encrypted with AES-128-CBC before being persisted and are never returned in API responses. PUT /v1/secrets atomically upserts and deletes secrets in one request. Pass a value string to create or update a key; pass value: null to delete it.
PUT /v1/secrets
{
  "secrets": [
    { "key": "OPENAI_API_KEY", "value": "sk-..." },
    { "key": "ANTHROPIC_API_KEY", "value": "sk-ant-..." },
    { "key": "STALE_KEY", "value": null }
  ]
}
Response:
{
  "data": {
    "upserted_keys": ["OPENAI_API_KEY", "ANTHROPIC_API_KEY"],
    "deleted_keys": ["STALE_KEY"]
  }
}
  • Admin-only — requires an admin API key or admin session
  • Atomic — all upserts and deletes in the request succeed or fail together
  • Duplicate keys — when the same key appears more than once, the last occurrence wins
  • Deleting a non-existent key succeeds silently

Python 3.14 Support

April 1, 2026 Available in arize-phoenix 13.21.0+, arize-phoenix-client 2.2.0+, arize-phoenix-evals 2.13.0+ Phoenix server, the Python client SDK, and the evals library now support Python 3.14 on Linux and macOS. Windows + Python 3.14 is not yet supported and will raise an explicit error at install time.