Skip to content

Arize Phoenix

Send CredenceStack's traces to Phoenix. A local Phoenix runs from one Python package, with no account and no Docker, which makes it a quick way to see agent traces in a platform built for AI applications. Phoenix also has a hosted version.

Prerequisites

  • pip install "credencestack[otel]"
  • A running Phoenix. Locally, install it in its own environment, because it brings many dependencies of its own:
python3.12 -m venv ~/phoenix-venv
~/phoenix-venv/bin/pip install arize-phoenix
~/phoenix-venv/bin/phoenix serve

It prints its addresses when it is ready: the UI on http://localhost:6006, OTLP over HTTP at http://localhost:6006/v1/traces and OTLP over gRPC on port 4317. Traces are stored on disk, so they survive a restart.

Configure

export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:6006
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
# Optional: a Phoenix project of its own instead of "default"
export OTEL_RESOURCE_ATTRIBUTES=openinference.project.name=credencestack
# Optional: trace ids in reports open the trace in Phoenix
export CREDENCESTACK_OTEL_TRACE_URL_TEMPLATE="http://localhost:6006/redirects/traces/{trace_id}"

The exporter adds /v1/traces to the endpoint. Without the resource attribute, traces land in Phoenix's default project.

For Phoenix's hosted version, use the endpoint and API-key header its settings page gives (OTEL_EXPORTER_OTLP_HEADERS); see Phoenix's documentation.

Run

credencestack otel check
credencestack run -p payments --agent credencestack.agents:scripted_naive --otel
credencestack test my_app.agent:agent --yes --otel

Verify

  1. otel check prints ✓ the endpoint accepted a test span; a run ends with OTel: exported N span(s).
  2. Open http://localhost:6006 and the project (default, or the name you set).
  3. Each credencestack scenario <id> #<epoch> row is one scenario epoch. Open one: the tree shows invoke_agent (shown as an agent), chat model calls, execute_tool calls (shown as tools) and credencestack grade.
  4. The scenario span's Attributes include credencestack.result and credencestack.findings.max_severity; its Events list the findings.
  5. With --otel-content, each execute_tool span also shows the tool's description, parameters and output (public scenarios only).

Useful views

Phoenix splits attribute names at each dot, so credencestack.result is written attributes['credencestack']['result'] in the span filter:

attributes['credencestack']['result'] == 'fail'
attributes['credencestack']['findings']['max_severity'] == 'critical'

Filter generated scenarios and difficulty

Scenario spans of generated scenarios carry credencestack.forge.* attributes (reference):

attributes['credencestack']['forge']['level'] >= 3 and attributes['credencestack']['result'] == 'fail'

Compare the failure rate by level with the fixed scenarios (credencestack.forge.generated absent) to see the brittleness of an agent in your own traces.

Limitations

  • Phoenix shows CredenceStack's spans with kind unknown in its span list, except the agent, model and tool spans it recognises in the trace tree. CredenceStack's own credencestack.* attributes are kept as span attributes.
  • Phoenix receives traces only; --otel-metrics needs a backend that takes metrics.

Last verified

2026-12-01: Phoenix 22.1.0 run locally (phoenix serve), with traces from credencestack run and credencestack test (scripted and offline example agents). The hosted version was not tested. Docs: https://arize.com/docs/phoenix.