全部產品
Search
文件中心

Application Real-Time Monitoring Service:4.x探針Span Attributes/Resources說明文檔

更新時間:Aug 29, 2025

OpenTelemetry Specification中為每一種外掛程式類型約定了其產生Span所應當包含的Attributes和Resources項,但ARMS探針出於資料上報量考慮,預設情況下在Span中並不會完全記錄這些Attributes。如果您在自訂配置頁面開啟了記錄 OTel Spec 約定attributes開關,則各架構Span將會增加對應的Attributes。

公用Attributes

Attribute名稱

含義

樣本

備忘

rpc.type

當前Span的調用類型。

0、40、60

該欄位為ARMS內部使用欄位,後續可能變更,使用者實際使用過程中可忽略該欄位內容。

serviceType

當前Span的服務類型。

1000、1010

該欄位為ARMS內部使用欄位,後續可能變更,使用者實際使用過程中可忽略該欄位內容。

ali.trace.flag

阿里雲可觀測產品標識,表示鏈路資料由哪款產品採集上報:

  • arms:Application Real-Time Monitoring Service

  • x-trace:Managed Service for OpenTelemetry

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。

公用Resources

Resource名稱

含義

樣本

備忘

host.name

應用所在主機名稱。

mall-gateway-54c647a51d-db78a

4.5.0 版本新增。

agentVersion

探針版本。

4.5.0_3d5f5f7

-

acs.arms.service.id

ARMS 服務 ID。

gauui7wh2@8a8763fbd23c898cd52***

該欄位為ARMS內部使用欄位,後續可能變更,使用者實際使用過程中可忽略該欄位內容。

acs.arms.workspace

ARMS 工作空間名。

default-cms-1324351***-cn-hangzhou

該欄位為ARMS內部使用欄位,後續可能變更,使用者實際使用過程中可忽略該欄位內容。

arms.appId

ARMS 應用 ID。

gauui7wh2@8a8763fbd23c898cd52***

該欄位為ARMS內部使用欄位,後續可能變更,使用者實際使用過程中可忽略該欄位內容。

clusterId

ACK 叢集 ID。

c98cd52967df89a8e9***

僅 ACK 環境存在,通過 KUBERNETES_CLUSTER_ID 環境變數擷取。

ipv4

應用 IP 位址。

127.0.0.1

-

namespace

叢集命名空間。

default

僅 K8s 環境存在,通過 KUBERNETES_POD_NAMESPACE 環境變數擷取。

workloadKind

工作負載類型。

Deployment

僅 K8s 環境存在,通過 ARMS_WORKLOADKIND 環境變數擷取。

workloadName

工作負載名。

mall-gateway

僅 K8s 環境存在,通過 ARMS_WORKLOADNAME 環境變數擷取。

HTTP類Span特有Attributes

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請求的Route。

/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

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

job.system

定時任務架構。

ShchedulerX、XXLJob

job.id

任務ID。

2847

job.name

任務名稱。

testJob

job.result.status

任務執行狀態。

success

訊息類調用特有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

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