You need to enable JavaScript to run this app.
文档中心
全栈可观测平台

全栈可观测平台

复制全文
下载 pdf
AgentKit 应用监控
AgentKit 埋点字段与指标说明
复制全文
下载 pdf
AgentKit 埋点字段与指标说明
AI 应用监控针对 AgentKit 提供一套埋点监控方案,在 AgentKit SDK 内部接入 OpenTelemetry 埋点,以更好观测 AgentKit Runtime 调用过程。整体涵盖 分布式追踪(Tracing) 和 指标监控(Metrics) 两大核心模块,本文为您具体介绍埋点相关的详细信息。​
Span​
每次调用 AgentKit Runtime 时, 会产生一条 Span 埋点。Span 包括以下 Attributes:​
​
Attribute​
类型​
描述​
示例​
gen_ai.system​
string​
大模型系统标识,固定为 agentkit,表示属于 AgentKit 的埋点。​
"agentkit"​
​
gen_ai.func_name​
string​
具体调用的函数。​
"run"​
gen_ai.user.id​
string​
调用用户 ID。​
"user_#a3f9b2"​
gen_ai.session.id​
string​
调用会话 ID。​
a2b1ee10-22df-42d9-8daa-986a609b1686 ​
gen_ai.span.kind​
string​
Gen AI 埋点 Span 类型,例如:"workflow", "llm" 等。​
"workflow"​
gen_ai.operation.name​
string​
针对 AgentKit Runtime 执行的操作, 例如:invoke_agent、tool 等。​
"invoke_agent"​
gen_ai.operation.type​
string​
针对 AgentKit Runtime 的操作类型, 例如:agent, a2a_agent 等。​
"agent"​
gen_ai.input​
string​
调用的输入。​
{"prompt": "你好"}​
gen_ai.output​
string​
调用的返回。​
"你好!很高兴为你提供帮助。有什么我可以为你做的吗?"​
​
Metrics​
记录调用耗时的 Metrics 指标,用于统计调用的耗时、QPS 等信息。生成结果统计指标如下:​
​
Metric​
类型​
说明​
指标维度​
agentkit_runtime_operation_latency​
Histogram​
​
调用耗时​
​
  • error_type:调用错误的枚举值,可通过非空判断是否是成功的请求。​
  • gen_ai_operation_name: 针对 AgentKit Runtime 执行的操作, 例如:invoke_agent、tool 等。​
  • gen_ai_operation_type: 针对 AgentKit Runtime 的操作类型, 例如:agent, a2a_agent 等。​
agentkit_runtime_operation_latency_count​
Counter​
调用次数​
  • error_type:调用错误的枚举值,可通过非空判断是否是成功的请求。​
  • gen_ai_operation_name: 针对 AgentKit Runtime 执行的操作, 例如:invoke_agent、tool 等。​
  • gen_ai_operation_type: 针对 AgentKit Runtime 的操作类型, 例如:agent, a2a_agent 等。​
​
最近更新时间:2026.01.27 20:57:33
这个页面对您有帮助吗?
有用
有用
无用
无用