在深入阅读此内容之前,建议先了解以下内容:
| 字段名 | 类型 | 描述 |
|---|---|---|
id | UUID | 运行(span)的唯一标识符。 |
name | string | 与运行关联的名称。 |
inputs | object | 提供给运行的输入映射或集合。 |
run_type | string | 运行类型,例如 'llm'、'chain'、'tool'。 |
start_time | datetime | 运行的开始时间。 |
end_time | datetime | 运行的结束时间。 |
extra | object | 运行的任何额外信息。 |
error | string | 如果运行遇到错误时的错误消息。 |
outputs | object | 运行生成的输出映射或集合。 |
events | array of objects | 与运行关联的事件对象列表。这对于启用了流式处理的运行相关。 |
tags | array of strings | 与运行关联的标签或标记。 |
trace_id | UUID | 运行所属追踪的唯一标识符。这也是追踪根运行的 id 字段。 |
dotted_order | string | 可排序的键,完全指定其在追踪层次结构中的位置。格式:<run_start_time>Z<run_uuid>.<child_run_start_time>Z<child_run_uuid>… |
status | string | 运行执行的当前状态,例如 'error'、'pending'、'success'。 |
child_run_ids | array of UUIDs | 所有子运行的 ID 列表。 |
direct_child_run_ids | array of UUIDs | 此运行的直接子运行的 ID 列表。 |
parent_run_ids | array of UUIDs | 所有父运行的 ID 列表。 |
feedback_stats | object | 此运行的反馈统计聚合。 |
reference_example_id | UUID | 与运行关联的参考示例的 ID。通常仅出现在评估运行中。 |
total_tokens | integer | 运行处理的总令牌数。 |
prompt_tokens | integer | 运行提示中的令牌数。 |
completion_tokens | integer | 运行完成中的令牌数。 |
total_cost | decimal | 处理运行的总成本。 |
prompt_cost | decimal | 运行提示部分的成本。 |
completion_cost | decimal | 运行完成部分的成本。 |
first_token_time | datetime | 模型输出第一个令牌生成的时间。仅适用于 run_type="llm" 且启用了流式处理的运行。 |
session_id | string | 运行的会话标识符,也称为追踪项目 ID。 |
in_dataset | boolean | 指示运行是否包含在数据集中。 |
parent_run_id | UUID | 父运行的唯一标识符。 |
execution_order (已弃用) | integer | 此运行在追踪中的执行顺序。 |
serialized | object | 如果适用,执行运行的对象的序列化状态。 |
manifest_id (已弃用) | UUID | 与运行关联的清单标识符。 |
manifest_s3_id | UUID | 清单的 S3 标识符。 |
inputs_s3_urls | object | 输入的 S3 URL。 |
outputs_s3_urls | object | 输出的 S3 URL。 |
price_model_id | UUID | 应用于运行的定价模型标识符。 |
app_path | string | 此运行的应用程序(UI)路径。 |
last_queued_at | datetime | 运行上次排队的时间。 |
share_token | string | 用于共享访问运行数据的令牌。 |
什么是 dotted_order?
一个运行的 dotted order 是一个可排序的键,完全指定了其在追踪层次结构中的位置。
以下面的示例为例:
id等于 dotted order 的最后 36 个字符(最后一个'Z'之后的后缀)。例如,在 grandchild 中查看0ec6b845-18b9-4aa1-8f1b-6ba3f9fdefd6。trace_id等于 dotted order 中的第一个 UUID(即dotted_order.split('.')[0].split('Z')[1])。- 如果
parent_run_id存在,它是 dotted order 中倒数第二个 UUID。例如,在 grandchild 中查看a8024e23-5b82-47fd-970e-f6a5ba3f5097。 - 如果将
dotted_order按点分割,每个段格式为 (<run_start_time>Z<run_id>)。
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

