OpenTelemetry Specification中为每一种插件类型约定了其生成Span所应当包含的Attributes项,但ARMS探针出于数据上报量考虑,默认情况下在Span中并不会记录这些Attributes。如果您在自定义配置页面开启了记录 OTel Spec 约定attributes开关,则各框架Span将会增加对应的Attributes。
公共Attributes
Attribute名称 | 含义 | 示例 | 备注 |
Attribute名称 | 含义 | 示例 | 备注 |
rpc.type | 当前Span的调用类型。 | 0、40、60 | 该字段为ARMS内部使用字段,后续可能变更,用户实际使用过程中可忽略该字段内容。 |
serviceType | 当前Span的服务类型。 | 1000、1010 | 该字段为ARMS内部使用字段,后续可能变更,用户实际使用过程中可忽略该字段内容。 |
ali.trace.flag | 阿里云可观测产品标识,表示链路数据由哪款产品采集上报:
| arms | 该字段为ARMS内部使用字段,后续可能变更,用户实际使用过程中可忽略该字段内容。 |
component.name | 当前Span对应的组件名称。 | mysql、http | 所有取值请参见应用监控指标说明。 |
hasInternalSpan | 记录当前Span是否有某个Span的spanKind为Internal。 | 1 | 仅在LocalRootSpan处包含该Attribute。 |
otel.scope.name | 生成当前Span的插件名称。 | io.opentelemetry.jdbc | - |
otel.scope.version | 生成当前Span的插件版本号。 | 1.28.0-SNAPSHOT | - |
root.service.id | 链路经过的第一个ARMS应用的ID。 | aokcd***@b57c445****** | - |
sample.service.id | 决定链路需要采样上报的应用ID。 | aokcd***@b57c445****** | 由于ARMS支持丰富的采样方式,决定采样的应用并不一定是当前的入口应用,详情请参见调用链采样模式选择(3.2.8及以上探针版本)。 |
sample.reason | 决定链路需要采样时命中的采样策略。 | s4 | 详情请参见采样标记。 |
ppid | 上游应用的ID。 | aokcd***@b57c445****** | - |
thread.name | 线程名。 | http-nio-8080-exec-162 | - |
thread.id | 线程ID。 | 12783 | - |
trace.protocol.type | 当前链路的Trace上下文传播协议。 | EagleEye、W3C | 仅在LocalRootSpan处包含该Attribute。 |
HTTP类Span特有Attributes
Attribute类型 | Attribute名称 | 含义 | 示例 |
Attribute类型 | Attribute名称 | 含义 | 示例 |
公共Attribute | http.method | HTTP方法名。 | GET、POST |
http.status_code | HTTP状态码。 | 200、404、500 | |
status | HTTP收敛后的状态码。 | 200、4xx、5xx | |
HTTP服务端Span Attribute | http.path | HTTP请求的Path。 | /api/v1/user |
http.route | HTTP请求的Root。 | /api/v1/user http.route和http.path不同,以常见的SpringMVC为例,当存在路径参数时,例如通过/api/v1/{userId}的方式声明了一个HTTP接口,http.route记录的是/api/v1/{userId},http.path记录的是实际请求的Path。 | |
http.params | HTTP请求的参数,即URL中 | userId=123 | |
HTTP客户端Span Attribute | destId | HTTP请求的域名和端口号。 | 127.0.0.1 |
endpoint | HTTP请求的Path。 | /api/v1/user |
RPC类调用特有Attribute
Attribute类型 | Attribute名称 | 含义 | 示例 |
Attribute类型 | Attribute名称 | 含义 | 示例 |
公共Attribute | rpc.system | RPC框架。 | Dubbo、gRPC |
rpc.service | RPC调用的服务名。 | com.test.TestService | |
rpc.method | RPC调用的方法名。 | sayHello | |
destId | 对端地址。 | 127.0.0.1:20880 |
定时任务类调用特有Attribute
Attribute类型 | Attribute名称 | 含义 | 示例 |
Attribute类型 | Attribute名称 | 含义 | 示例 |
公共Attribute | job.system | 定时任务框架。 | ShchedulerX、XXLJob |
job.id | 任务ID。 | 2847 | |
job.name | 任务名称。 | testJob | |
job.result.status | 任务执行状态。 | success |
消息类调用特有Attribute
Attribute类型 | Attribute名称 | 含义 | 示例 |
Attribute类型 | Attribute名称 | 含义 | 示例 |
公共Attribute | messaging.system | 消息框架。 | RocketMQ、Kafka |
messaging.operation | 消息处理动作。 | publish、receive、process | |
messaging.message.payload_size_bytes | 消息大小。 | 137 | |
messaging.destination.name | 消息Topic。 | user_order | |
destId | 消息Broker的地址。 | rmq-********-vpc.cn-beijing.rmq.aliyuncs.com:8080 | |
endpoint | ${destId} + @ + ${messaging.destination.name} | rmq-********-vpc.cn-beijing.rmq.aliyuncs.com:8080@user_order | |
RocketMQ特有Attributes | messaging.consume.delay_ms | 消息消费延迟(仅RocketMQ支持)。 | 128 |
Kafka特有Attributes | messaging.kafka.destination.partition | Kafka消息所在的Partition。 | 5 |
messaging.kafka.message.offset | Kafka消息所在Partition的Offset。 | 42 | |
messaging.kafka.message.key | Kafka消息Key。 | mykey |
数据库/NOSQL类
Attribute类型 | Attribute名称 | 含义 | 示例 |
Attribute类型 | Attribute名称 | 含义 | 示例 |
公共Attribute | db.name | 数据库名称。 从完整连接串参数中解析得到,如果数据库连接串中无相关信息则该字段为空。 | test |
net.peer.name | 数据库连接串中域名和端口部分。 | *****.mysql.rds.aliyuncs.com:3306 | |
sql | 数据库语句。 | SELECT * FROM user WHERE user_id=? | |
db.statement.id | 数据库语句编码成的16位字符编码ID。 | 5a620e8cf06156a5 | |
destId | 数据库名称,内容同db.name,冗余以兼容不同跳转查询场景,后续会删除。 | test | |
endpoint | 数据库连接串,内容同net.peer.name,冗余以兼容不同跳转查询场景,后续会删除。 | *****.mysql.rds.aliyuncs.com:3306 | |
out.ids | 数据库连接串,内容同net.peer.name,冗余以兼容不同跳转查询场景,后续会删除。 | *****.mysql.rds.aliyuncs.com:3306 | |
opType | 数据库操作类型。 | SELECT | |
response.size | 数据库查询响应大小(字节数)。 | 54 | |
MongoDB Attribute | db.mongodb.collection | MongoDB操作的集合名称。 | user |
Redis Attribute | redis.command.key | Redis访问的Key。 | key |
- 本页导读 (1)
- 公共Attributes
- HTTP类Span特有Attributes
- RPC类调用特有Attribute
- 定时任务类调用特有Attribute
- 消息类调用特有Attribute
- 数据库/NOSQL类