arize-trace
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseArize Trace Skill
Arize Trace Skill
Concepts
概念说明
- Trace = a tree of spans sharing a , rooted at a span with
context.trace_idparent_id = null - Span = a single operation (LLM call, tool call, retriever, chain, agent)
- Session = a group of traces sharing (e.g., a multi-turn conversation)
attributes.session.id
Use to download trace data. This is the only supported command for retrieving spans.
ax spans exportExploratory export rule: When exporting spans or traces without a specific , , or (i.e., browsing/exploring a project), always start with to pull a small sample first. Summarize what you find, then pull more data only if the user asks or the task requires it. This avoids slow queries and overwhelming output on large projects.
--trace-id--span-id--session-id-l 50Default output directory: Always use on every call. The CLI automatically creates the directory and adds it to .
--output-dir .arize-tmp-tracesax spans export.gitignore- Trace = 共享同一个的span树,根节点是
context.trace_id的spanparent_id = null - Span = 单个操作(LLM调用、工具调用、检索器、链、Agent)
- Session = 共享的一组traces(例如,多轮对话)
attributes.session.id
使用下载追踪数据。这是检索spans的唯一支持命令。
ax spans export探索性导出规则: 当导出spans或traces但未指定、或时(即浏览/探索项目),请始终以开头,先拉取小样本数据。总结发现的内容后,仅在用户要求或任务需要时再拉取更多数据。这可以避免在大型项目中出现查询缓慢和输出内容过多的问题。
--trace-id--span-id--session-id-l 50默认输出目录: 每次调用时,请始终使用。CLI会自动创建该目录并将其添加到中。
ax spans export--output-dir .arize-tmp-traces.gitignorePrerequisites
前置条件
Three things are needed: CLI, an API key (env var or profile), and a space ID. A project name is also needed but usually comes from the user's message.
ax需要三个要素: CLI、API密钥(环境变量或配置文件)和空间ID。还需要项目名称,通常可从用户的消息中获取。
axInstall ax
安装ax
Verify is installed and working before proceeding:
ax- Check if is on PATH:
ax(Unix) orcommand -v ax(Windows)where ax - If not found, check common install locations:
- macOS/Linux:
test -x ~/.local/bin/ax && export PATH="$HOME/.local/bin:$PATH" - Windows: check or
%APPDATA%\Python\Scripts\ax.exe%LOCALAPPDATA%\Programs\Python\Scripts\ax.exe
- macOS/Linux:
- If still not found, install it (requires shell access to install packages):
- Preferred:
uv tool install arize-ax-cli - Alternative:
pipx install arize-ax-cli - Fallback:
pip install arize-ax-cli
- Preferred:
- After install, if is not on PATH:
ax- macOS/Linux:
export PATH="$HOME/.local/bin:$PATH" - Windows (PowerShell):
$env:PATH = "$env:APPDATA\Python\Scripts;$env:PATH"
- macOS/Linux:
- If fails with an SSL/certificate error:
ax --version- macOS:
export SSL_CERT_FILE=/etc/ssl/cert.pem - Linux:
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt - Windows (PowerShell): (or use
$env:SSL_CERT_FILE = "C:\Program Files\Common Files\SSL\cert.pem"to find the cert bundle)python -c "import certifi; print(certifi.where())"
- macOS:
- must succeed before proceeding. If it doesn't, stop and ask the user for help.
ax --version
在继续之前,请验证是否已安装并能正常工作:
ax- 检查是否在PATH中:
ax(Unix系统)或command -v ax(Windows系统)where ax - 如果未找到,请检查常见安装位置:
- macOS/Linux:
test -x ~/.local/bin/ax && export PATH="$HOME/.local/bin:$PATH" - Windows:检查或
%APPDATA%\Python\Scripts\ax.exe%LOCALAPPDATA%\Programs\Python\Scripts\ax.exe
- macOS/Linux:
- 如果仍未找到,请安装它(需要Shell权限来安装包):
- 推荐方式:
uv tool install arize-ax-cli - 替代方式:
pipx install arize-ax-cli - 备用方式:
pip install arize-ax-cli
- 推荐方式:
- 安装后,如果不在PATH中:
ax- macOS/Linux:
export PATH="$HOME/.local/bin:$PATH" - Windows(PowerShell):
$env:PATH = "$env:APPDATA\Python\Scripts;$env:PATH"
- macOS/Linux:
- 如果因SSL/证书错误失败:
ax --version- macOS:
export SSL_CERT_FILE=/etc/ssl/cert.pem - Linux:
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt - Windows(PowerShell):(或使用
$env:SSL_CERT_FILE = "C:\Program Files\Common Files\SSL\cert.pem"查找证书包位置)python -c "import certifi; print(certifi.where())"
- macOS:
- 在继续之前,必须执行成功。如果失败,请停止操作并向用户寻求帮助。
ax --version
Verify environment
验证环境
Run a quick check for credentials:
macOS/Linux (bash):
bash
ax --version && echo "--- env ---" && echo "ARIZE_API_KEY: ${ARIZE_API_KEY:-(not set)}" && echo "ARIZE_SPACE_ID: ${ARIZE_SPACE_ID:-(not set)}" && echo "--- profiles ---" && ax profiles show 2>&1Windows (PowerShell):
powershell
ax --version; Write-Host "--- env ---"; Write-Host "ARIZE_API_KEY: $env:ARIZE_API_KEY"; Write-Host "ARIZE_SPACE_ID: $env:ARIZE_SPACE_ID"; Write-Host "--- profiles ---"; ax profiles show 2>&1Read the output and proceed immediately if either the env var or the profile has an API key. Only ask the user if both are missing. Resolve failures:
- No API key in env and no profile → AskQuestion: "Arize API key (https://app.arize.com/admin > API Keys)"
- Space ID unknown → AskQuestion, or run and present as selectable options
ax projects list -o json --limit 100 --space-id $ARIZE_SPACE_ID - Project unclear → ask, or run and search for a match
ax projects list -o json --limit 100
IMPORTANT: is required when using a human-readable project name as the positional argument. It is not needed when using a base64-encoded project ID.
--space-idPROJECT快速检查凭据:
macOS/Linux(bash):
bash
ax --version && echo "--- env ---" && echo "ARIZE_API_KEY: ${ARIZE_API_KEY:-(not set)}" && echo "ARIZE_SPACE_ID: ${ARIZE_SPACE_ID:-(not set)}" && echo "--- profiles ---" && ax profiles show 2>&1Windows(PowerShell):
powershell
ax --version; Write-Host "--- env ---"; Write-Host "ARIZE_API_KEY: $env:ARIZE_API_KEY"; Write-Host "ARIZE_SPACE_ID: $env:ARIZE_SPACE_ID"; Write-Host "--- profiles ---"; ax profiles show 2>&1立即读取输出并继续:如果环境变量或配置文件中存在API密钥,即可继续。仅当两者都缺失时,才向用户询问。解决失败情况:
- 环境变量中无API密钥且无配置文件 → 询问用户:"请提供Arize API密钥(获取地址:https://app.arize.com/admin > API Keys)"
- 未知空间ID → 询问用户,或运行并提供可选列表
ax projects list -o json --limit 100 --space-id $ARIZE_SPACE_ID - 项目不明确 → 询问用户,或运行并搜索匹配项
ax projects list -o json --limit 100
重要提示: 当使用人类可读的项目名称作为位置参数时,是必需的。使用base64编码的项目ID时,则不需要。
PROJECT--space-idExport Spans: ax spans export
ax spans export导出Spans:ax spans export
ax spans exportThe primary command for downloading trace data to a file.
将追踪数据下载到文件的主要命令。
By trace ID
通过Trace ID导出
bash
undefinedbash
undefinedUsing project name (requires --space-id)
使用项目名称(需要--space-id)
ax spans export PROJECT_NAME --trace-id TRACE_ID --space-id SPACE_ID --output-dir .arize-tmp-traces
ax spans export PROJECT_NAME --trace-id TRACE_ID --space-id SPACE_ID --output-dir .arize-tmp-traces
Using base64 project ID (no --space-id needed)
使用base64项目ID(无需--space-id)
ax spans export PROJECT_ID --trace-id TRACE_ID --output-dir .arize-tmp-traces
undefinedax spans export PROJECT_ID --trace-id TRACE_ID --output-dir .arize-tmp-traces
undefinedBy span ID
通过Span ID导出
bash
ax spans export PROJECT_NAME --span-id SPAN_ID --space-id SPACE_ID --output-dir .arize-tmp-tracesbash
ax spans export PROJECT_NAME --span-id SPAN_ID --space-id SPACE_ID --output-dir .arize-tmp-tracesBy session ID
通过Session ID导出
bash
ax spans export PROJECT_NAME --session-id SESSION_ID --space-id SPACE_ID --output-dir .arize-tmp-tracesbash
ax spans export PROJECT_NAME --session-id SESSION_ID --space-id SPACE_ID --output-dir .arize-tmp-tracesFlags
标志参数
| Flag | Type | Required | Description |
|---|---|---|---|
| string | mutex | Filter: |
| string | mutex | Filter: |
| string | mutex | Filter: |
| string (positional) | yes (or | Project name or base64 ID (positional arg, not a flag) |
| string | yes (when | Space ID; required to resolve project names |
| int | no | Lookback window (default: 30) |
| string | no | Override start (ISO 8601) |
| string | no | Override end (ISO 8601) |
| string | no | Output directory (default: |
| bool | no | Print JSON to stdout instead of file |
| bool | no | Use Arrow Flight for bulk export (see below) |
Exactly one of , , is required.
--trace-id--span-id--session-idOutput is a JSON array of span objects. File naming: .
{type}_{id}_{timestamp}/spans.json| 标志 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| 字符串 | 互斥 | 过滤条件: |
| 字符串 | 互斥 | 过滤条件: |
| 字符串 | 互斥 | 过滤条件: |
| 字符串(位置参数) | 是(或使用 | 项目名称或base64 ID(位置参数,非标志) |
| 字符串 | 是(当 | 空间ID;解析项目名称时必需 |
| 整数 | 否 | 回溯窗口(默认:30) |
| 字符串 | 否 | 覆盖开始时间(ISO 8601格式) |
| 字符串 | 否 | 覆盖结束时间(ISO 8601格式) |
| 字符串 | 否 | 输出目录(默认: |
| 布尔值 | 否 | 将JSON打印到标准输出而非文件 |
| 布尔值 | 否 | 使用Arrow Flight进行批量导出(见下文) |
必须指定、、中的其中一个。
--trace-id--span-id--session-id输出是span对象的JSON数组。文件命名规则:。
{type}_{id}_{timestamp}/spans.jsonBulk export with --all
(Arrow Flight)
--all使用--all
进行批量导出(Arrow Flight)
--allBy default, uses the REST API which is limited to 500 spans per page and capped by . Pass to switch to Arrow Flight for streaming bulk export with no span limit.
ax spans export--limit--allbash
ax spans export PROJECT_NAME --space-id SPACE_ID --filter "status_code = 'ERROR'" --all --output-dir .arize-tmp-tracesREST vs Flight trade-offs:
- REST (default): Lower friction -- no Arrow/Flight dependency needed, uses standard HTTPS ports, works through any corporate proxy or firewall. Limited to 500 spans per page.
- Flight (): Required for bulk export beyond 500 spans. Uses gRPC+TLS on a separate host/port which some corporate networks may block.
--all
When to use :
--all- Exporting more than 500 spans
- Downloading full traces with many child spans
- Large time-range exports
Agent auto-escalation rule: If a REST export returns exactly the number of spans requested by (or 500 if no limit was set), the result is likely truncated. Increase or re-run with to get the full dataset — but only when the user asks or the task requires more data.
-l-l--allRequirements for :
--all- is required (Flight uses
--space-id+space_id, notproject_name)project_id - is ignored when
--limitis set--all
Networking notes for :
Arrow Flight connects to via gRPC+TLS -- this is a different host from the REST API (). On internal or private networks, the Flight endpoint may use a different host/port. Configure via:
--allflight.arize.com:443api.arize.com- ax profile: ,
flight_host,flight_portflight_scheme - Environment variables: ,
ARIZE_FLIGHT_HOST,ARIZE_FLIGHT_PORTARIZE_FLIGHT_SCHEME
The flag is also available on , , and with the same behavior (REST by default, Flight with ).
--allax traces exportax datasets exportax experiments export--all默认情况下,使用REST API,每页最多返回500个spans,并受限制。传递可切换到Arrow Flight进行流式批量导出,无span数量限制。
ax spans export--limit--allbash
ax spans export PROJECT_NAME --space-id SPACE_ID --filter "status_code = 'ERROR'" --all --output-dir .arize-tmp-tracesREST与Flight的权衡:
- REST(默认):门槛更低 — 无需Arrow/Flight依赖,使用标准HTTPS端口,可通过任何企业代理或防火墙。每页最多500个spans。
- Flight():导出超过500个spans时必需。使用gRPC+TLS连接到单独的主机/端口,部分企业网络可能会阻止此连接。
--all
何时使用:
--all- 导出超过500个spans
- 下载包含多个子spans的完整traces
- 大时间范围导出
Agent自动升级规则: 如果REST导出返回的span数量恰好等于指定的数量(或未设置限制时为500),结果可能被截断。增加的值或使用重新运行以获取完整数据集 — 但仅在用户要求或任务需要更多数据时执行此操作。
-l-l--all--all- 必需(Flight使用
--space-id+space_id,而非project_name)project_id - 设置后,
--all将被忽略--limit
--allflight.arize.com:443api.arize.com- ax配置文件:、
flight_host、flight_portflight_scheme - 环境变量:、
ARIZE_FLIGHT_HOST、ARIZE_FLIGHT_PORTARIZE_FLIGHT_SCHEME
--allax traces exportax datasets exportax experiments export--allExport Traces: ax traces export
ax traces export导出Traces:ax traces export
ax traces exportExport full traces -- all spans belonging to traces that match a filter. Uses a two-phase approach:
- Phase 1: Find spans matching (up to
--filtervia REST, or all via Flight with--limit)--all - Phase 2: Extract unique trace IDs, then fetch every span for those traces
bash
undefined导出完整traces — 属于匹配过滤条件的traces的所有spans。采用两阶段方法:
- 阶段1: 查找匹配的spans(通过REST最多返回
--filter个,通过Flight返回所有)--limit - 阶段2: 提取唯一的trace ID,然后获取这些traces的所有spans
bash
undefinedExplore recent traces (start small with -l 50, pull more if needed)
导出最近的traces(从-l 50开始,按需拉取更多)
ax traces export PROJECT_NAME --space-id SPACE_ID -l 50 --output-dir .arize-tmp-traces
ax traces export PROJECT_NAME --space-id SPACE_ID -l 50 --output-dir .arize-tmp-traces
Export traces with error spans (REST, up to 500 spans in phase 1)
导出包含错误spans的traces(REST,阶段1最多500个spans)
ax traces export PROJECT_NAME --space-id SPACE_ID --filter "status_code = 'ERROR'" --stdout
ax traces export PROJECT_NAME --space-id SPACE_ID --filter "status_code = 'ERROR'" --stdout
Export all traces matching a filter via Flight (no limit)
通过Flight导出所有匹配过滤条件的traces(无限制)
ax traces export PROJECT_NAME --space-id SPACE_ID --filter "status_code = 'ERROR'" --all
undefinedax traces export PROJECT_NAME --space-id SPACE_ID --filter "status_code = 'ERROR'" --all
undefinedFlags
标志参数
| Flag | Type | Default | Description |
|---|---|---|---|
| string | required | Positional argument (name or base64 ID) |
| string | none | Filter expression for phase-1 span lookup |
| string | none | Space ID; required when PROJECT is a name or when using |
| int | 50 | Max number of traces to export |
| int | 30 | Lookback window in days |
| string | none | Override start (ISO 8601) |
| string | none | Override end (ISO 8601) |
| string | | Output directory |
| bool | false | Print JSON to stdout instead of file |
| bool | false | Use Arrow Flight for both phases (see spans |
| string | default | Configuration profile |
| 标志 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串 | 必填 | 位置参数(名称或base64 ID) |
| 字符串 | 无 | 阶段1查找spans的过滤表达式 |
| 字符串 | 无 | 空间ID;当PROJECT为名称或使用 |
| 整数 | 50 | 最多导出的trace数量 |
| 整数 | 30 | 回溯窗口(天数) |
| 字符串 | 无 | 覆盖开始时间(ISO 8601格式) |
| 字符串 | 无 | 覆盖结束时间(ISO 8601格式) |
| 字符串 | | 输出目录 |
| 布尔值 | false | 将JSON打印到标准输出而非文件 |
| 布尔值 | false | 两个阶段均使用Arrow Flight(见上文spans的 |
| 字符串 | default | 配置文件 |
How it differs from ax spans export
ax spans export与ax spans export
的区别
ax spans export- exports individual spans matching a filter
ax spans export - exports complete traces -- it finds spans matching the filter, then pulls ALL spans for those traces (including siblings and children that may not match the filter)
ax traces export
- 导出匹配过滤条件的单个spans
ax spans export - 导出完整traces — 先找到匹配过滤条件的spans,然后拉取这些traces的所有spans(包括可能不匹配过滤条件的兄弟和子spans)
ax traces export
Filter Syntax Reference
过滤语法参考
SQL-like expressions passed to .
--filter传递给的类SQL表达式。
--filterCommon filterable columns
常见可过滤列
| Column | Type | Description | Example Values |
|---|---|---|---|
| string | Span name | |
| string | Status | |
| number | Duration in ms | |
| string | Parent span ID | null for root spans |
| string | Trace ID | |
| string | Span ID | |
| string | Session ID | |
| string | Span kind | |
| string | LLM model | |
| string | Span input | |
| string | Span output | |
| string | Error type | |
| string | Error message | |
| string | Error tracebacks | Use CONTAINS (not exact match) |
| 列 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| 字符串 | Span名称 | |
| 字符串 | 状态 | |
| 数字 | 耗时(毫秒) | |
| 字符串 | 父span ID | 根spans为null |
| 字符串 | Trace ID | |
| 字符串 | Span ID | |
| 字符串 | Session ID | |
| 字符串 | Span类型 | |
| 字符串 | LLM模型 | |
| 字符串 | Span输入 | |
| 字符串 | Span输出 | |
| 字符串 | 错误类型 | |
| 字符串 | 错误消息 | |
| 字符串 | 错误回溯 | 使用CONTAINS(不使用精确匹配) |
Operators
操作符
=!=<<=>>=ANDORINCONTAINSLIKEIS NULLIS NOT NULL=!=<<=>>=ANDORINCONTAINSLIKEIS NULLIS NOT NULLExamples
示例
status_code = 'ERROR'
latency_ms > 5000
name = 'ChatCompletion' AND status_code = 'ERROR'
attributes.llm.model_name = 'gpt-4o'
attributes.openinference.span.kind IN ('LLM', 'AGENT')
attributes.error.type LIKE '%Transport%'
event.attributes CONTAINS 'TimeoutError'status_code = 'ERROR'
latency_ms > 5000
name = 'ChatCompletion' AND status_code = 'ERROR'
attributes.llm.model_name = 'gpt-4o'
attributes.openinference.span.kind IN ('LLM', 'AGENT')
attributes.error.type LIKE '%Transport%'
event.attributes CONTAINS 'TimeoutError'Tips
提示
- Prefer over multiple
INconditions:ORnotname IN ('a', 'b', 'c')name = 'a' OR name = 'b' OR name = 'c' - Start broad with , then switch to
LIKEor=once you know exact valuesIN - Use for
CONTAINS(error tracebacks) -- exact match is unreliable on complex textevent.attributes - Always wrap string values in single quotes
- 优先使用而非多个
IN条件:OR而非name IN ('a', 'b', 'c')name = 'a' OR name = 'b' OR name = 'c' - 先用进行宽泛搜索,确定精确值后再切换为
LIKE或=IN - 对(错误回溯)使用
event.attributes— 复杂文本的精确匹配不可靠CONTAINS - 字符串值始终用单引号包裹
Workflows
工作流
Debug a failing trace
调试失败的Trace
ax traces export PROJECT --space-id SPACE_ID --filter "status_code = 'ERROR'" -l 50 --output-dir .arize-tmp-traces- Read the output file, look for spans with
status_code: ERROR - Check and
attributes.error.typeon error spansattributes.error.message
ax traces export PROJECT --space-id SPACE_ID --filter "status_code = 'ERROR'" -l 50 --output-dir .arize-tmp-traces- 读取输出文件,查找的spans
status_code: ERROR - 检查错误spans的和
attributes.error.typeattributes.error.message
Download a conversation session
下载对话Session
ax spans export PROJECT --session-id SESSION_ID --space-id SPACE_ID --output-dir .arize-tmp-traces- Spans are ordered by , grouped by
start_timecontext.trace_id - If you only have a trace_id, export that trace first, then look for in the output to get the session ID
attributes.session.id
ax spans export PROJECT --session-id SESSION_ID --space-id SPACE_ID --output-dir .arize-tmp-traces- Spans按排序,按
start_time分组context.trace_id - 如果只有trace_id,先导出该trace,然后在输出中查找以获取session ID
attributes.session.id
Export for offline analysis
导出用于离线分析
bash
ax spans export PROJECT --trace-id TRACE_ID --space-id SPACE_ID --output-dir .arize-tmp-traces --stdout | jq '.[]'bash
ax spans export PROJECT --trace-id TRACE_ID --space-id SPACE_ID --output-dir .arize-tmp-traces --stdout | jq '.[]'Span Column Reference (OpenInference Semantic Conventions)
Span列参考(OpenInference语义约定)
Core Identity and Timing
核心标识与计时
| Column | Description |
|---|---|
| Span operation name (e.g., |
| Trace ID -- all spans in a trace share this |
| Unique span ID |
| Parent span ID. |
| When the span started (ISO 8601) |
| When the span ended |
| Duration in milliseconds |
| |
| Optional message (usually set on errors) |
| |
| 列 | 描述 |
|---|---|
| Span操作名称(例如, |
| Trace ID — 同一个trace中的所有spans共享此ID |
| 唯一的Span ID |
| 父Span ID。根spans(即traces)为 |
| Span开始时间(ISO 8601格式) |
| Span结束时间 |
| 耗时(毫秒) |
| |
| 可选消息(通常在错误时设置) |
| |
Where to Find Prompts and LLM I/O
提示词与LLM输入输出的位置
Generic input/output (all span kinds):
| Column | What it contains |
|---|---|
| The input to the operation. For LLM spans, often the full prompt or serialized messages JSON. For chain/agent spans, the user's question. |
| Format hint: |
| The output. For LLM spans, the model's response. For chain/agent spans, the final answer. |
| Format hint for output |
LLM-specific message arrays (structured chat format):
| Column | What it contains |
|---|---|
| Structured input messages array (system, user, assistant, tool). Where chat prompts live in role-based format. |
| Array of roles: |
| Array of message content strings |
| Structured output messages from the model |
| Model response content |
| Tool calls the model wants to make |
| Arguments for those tool calls |
Prompt templates:
| Column | What it contains |
|---|---|
| The prompt template with variable placeholders (e.g., |
| Template variable values (JSON object) |
Finding prompts by span kind:
- LLM span: Check for structured chat messages, OR
attributes.llm.input_messagesfor serialized prompt. Checkattributes.input.valuefor the template.attributes.llm.prompt_template.template - Chain/Agent span: Check for the user's question. Actual LLM prompts are on child LLM spans.
attributes.input.value - Tool span: Check for tool input,
attributes.input.valuefor tool result.attributes.output.value
通用输入/输出(所有Span类型):
| 列 | 包含内容 |
|---|---|
| 操作的输入。对于LLM spans,通常是完整提示词或序列化消息JSON。对于链/Agent spans,是用户的问题。 |
| 格式提示: |
| 操作的输出。对于LLM spans,是模型的响应。对于链/Agent spans,是最终答案。 |
| 输出格式提示 |
LLM特定消息数组(结构化聊天格式):
| 列 | 包含内容 |
|---|---|
| 结构化输入消息数组(系统、用户、助手、工具)。基于角色的格式中聊天提示词的存储位置。 |
| 角色数组: |
| 消息内容字符串数组 |
| 模型输出的结构化消息 |
| 模型响应内容 |
| 模型想要调用的工具名称 |
| 这些工具调用的参数 |
提示词模板:
| 列 | 包含内容 |
|---|---|
| 带有变量占位符的提示词模板(例如, |
| 模板变量值(JSON对象) |
按Span类型查找提示词:
- LLM span:检查获取结构化聊天消息,或检查
attributes.llm.input_messages获取序列化提示词。检查attributes.input.value获取模板。attributes.llm.prompt_template.template - 链/Agent span:检查获取用户的问题。实际LLM提示词在子LLM spans中。
attributes.input.value - 工具span:检查获取工具输入,
attributes.input.value获取工具结果。attributes.output.value
LLM Model and Cost
LLM模型与成本
| Column | Description |
|---|---|
| Model identifier (e.g., |
| Model parameters JSON (temperature, max_tokens, top_p, etc.) |
| Input token count |
| Output token count |
| Total tokens |
| Input cost in USD |
| Output cost in USD |
| Total cost in USD |
| 列 | 描述 |
|---|---|
| 模型标识符(例如, |
| 模型参数JSON(temperature、max_tokens、top_p等) |
| 输入token数量 |
| 输出token数量 |
| 总token数量 |
| 输入成本(美元) |
| 输出成本(美元) |
| 总成本(美元) |
Tool Spans
工具Spans
| Column | Description |
|---|---|
| Tool/function name |
| Tool description |
| Tool parameter schema (JSON) |
| 列 | 描述 |
|---|---|
| 工具/函数名称 |
| 工具描述 |
| 工具参数 schema(JSON) |
Retriever Spans
检索器Spans
| Column | Description |
|---|---|
| Retrieved documents array |
| Document IDs |
| Relevance scores |
| Document text content |
| Document metadata |
| 列 | 描述 |
|---|---|
| 检索到的文档数组 |
| 文档ID |
| 相关性分数 |
| 文档文本内容 |
| 文档元数据 |
Reranker Spans
重排序器Spans
| Column | Description |
|---|---|
| The query being reranked |
| Reranker model |
| Number of results |
| Input documents (ids, scores, contents, metadatas) |
| Reranked output documents |
| 列 | 描述 |
|---|---|
| 正在重排序的查询 |
| 重排序器模型 |
| 结果数量 |
| 输入文档(ID、分数、内容、元数据) |
| 重排序后的输出文档 |
Session, User, and Custom Metadata
Session、用户与自定义元数据
| Column | Description |
|---|---|
| Session/conversation ID -- groups traces into multi-turn sessions |
| End-user identifier |
| Custom key-value metadata. Any key under this prefix is user-defined (e.g., |
| 列 | 描述 |
|---|---|
| Session/对话ID — 将traces分组为多轮会话 |
| 终端用户标识符 |
| 自定义键值元数据。此前缀下的任何键均为用户定义(例如, |
Errors and Exceptions
错误与异常
| Column | Description |
|---|---|
| Exception class name (e.g., |
| Exception message text |
| Error tracebacks and detailed event data. Use |
| 列 | 描述 |
|---|---|
| 异常类名称(例如, |
| 异常消息文本 |
| 错误回溯和详细事件数据。过滤时使用 |
Evaluations and Annotations
评估与标注
| Column | Description |
|---|---|
| Human or auto-eval label (e.g., |
| Numeric score (e.g., |
| Freeform annotation text |
| 列 | 描述 |
|---|---|
| 人工或自动评估标签(例如, |
| 数值分数(例如, |
| 自由格式标注文本 |
Embeddings
嵌入
| Column | Description |
|---|---|
| Embedding model name |
| Text chunks that were embedded |
| 列 | 描述 |
|---|---|
| 嵌入模型名称 |
| 被嵌入的文本块 |
Troubleshooting
故障排除
| Problem | Solution |
|---|---|
| Check |
| macOS: |
| The installed |
| Follow "Resolve credentials" in Prerequisites to auto-discover or prompt for the API key |
| You are likely using a project name (e.g., |
| Expand |
| Check column name spelling, wrap string values in single quotes |
| Use |
| 问题 | 解决方案 |
|---|---|
| 检查 |
| macOS: |
子命令存在但提示 | 安装的 |
| 按照前置条件中的“解决凭据问题”步骤自动发现或提示用户提供API密钥 |
使用有效API密钥但提示 | 您可能在使用项目名称(例如, |
| 扩大 |
| 检查列名拼写,字符串值用单引号包裹 |
| 大型导出时超时 | 使用 |
Save Credentials
保存凭据
At session end, if the user manually provided an API key, space ID, or project name (not loaded from an existing profile), offer to save them to . Use AskQuestion with "Yes, save them" / "No thanks". Skip if all values were already in the profile.
~/.arize/config.tomlRead the existing file (or create it), add/update only the new fields, and write it back:
toml
[auth]
api_key = "THE_API_KEY"
[defaults]
space_id = "THE_SPACE_ID"
project = "THE_PROJECT_NAME"会话结束时,如果用户手动提供了API密钥、空间ID或项目名称(并非从现有配置文件加载),请提供将其保存到的选项。使用询问用户功能,提供“是,保存”/“不用了,谢谢”选项。如果所有值已在配置文件中存在,则跳过此步骤。
~/.arize/config.toml读取现有文件(或创建新文件),仅添加/更新新字段,然后写回:
toml
[auth]
api_key = "THE_API_KEY"
[defaults]
space_id = "THE_SPACE_ID"
project = "THE_PROJECT_NAME"