ViewName
字段中指定视图名称;在 Prometheus 集成场景,可以忽略视图。视图名称 | 描述 |
service_metric | 统计应用的通用性能表现,例如请求数量、响应时间等。 |
error_metric | 统计链路中的错误数量。 |
sql_metric | 统计应用访问数据库的性能表现,例如 SQL 执行次数、响应时间等。 |
mq_metric | 统计应用访问消息队列的性能表现,例如消息生产的次数、响应时间等。 |
云 API 维度名称 | Prometheus 标签名称 | 描述 |
tapm.app.id | tapm_app_id | 云 AppID |
tapm.instance.key | apm_instance | APM 实例 ID |
service.name | apm_service_name | 应用名 |
service.instance | service_instance | 应用实例 |
agent.version | agent_version | 探针版本号 |
service.version | service_version | 应用版本 |
span.kind
,代表 Span 类型。详情请参见下文。云 API 指标名称 | Prometheus 指标名称 | 类型 | 描述 | 单位 | 桶分布 |
request_count | service_request_count | Gauge | 请求数量 | - | - |
error_request_count | service_error_request_count | Gauge | 错误请求数量 | - | - |
duration_avg | service_duration_avg | Gauge | 平均耗时 | ms | - |
duration_max | service_duration_max | Gauge | 最大耗时 | ms | - |
duration_min | service_duration_min | Gauge | 最小耗时 | ms | - |
slow_request_count | service_slow_request_count | Gauge | 慢调用数量(>2000ms) | - | - |
tolerate_request_count | service_tolerate_request_count | Gauge | 容忍调用数量(500 - 2000ms) | - | - |
duration_p50 | service_duration_p50 | Gauge | 耗时 p50 | ms | - |
duration_p90 | service_duration_p90 | Gauge | 耗时 p90 | ms | - |
duration_p95 | service_duration_p95 | Gauge | 耗时 p95 | ms | - |
duration_p99 | service_duration_p99 | Gauge | 耗时 p99 | ms | - |
range_count_duration | 不支持 | Histogram | 耗时分布 | - | 0,1,5,10,50,100,200,300,400,500,600,700,800,900,1000,1500,2000,3000,4000,5000,7000,10000,15000 |
云 API 维度名称 | Prometheus 标签名称 | 描述 |
span.kind | span_kind | Span 类型 |
service.component | service_component | 组件类型 |
peer.service | peer_service | 对端应用名 |
peer.operation | peer_operation | 对端接口名 |
peer.filled | peer_filled | APM 处理后的对端应用名 |
operation | operation | 接口名 |
peer.instance | peer_instance | 对端实例 |
status.message | status_message | 请求状态信息 |
status.code | status_code | 请求状态码 |
status_code_xx | status_code_xx | APM 处理后的状态码 |
error.object | error_object | 错误类型 |
namespace | namespace | 命名空间 |
service.view | service_view | 组件视图(枚举值:"sql"、"mq",如果没有则为空) |
k8s.deployment.name | k8s_deployment_name | Kubernetes 负载名 |
k8s.pod.name | k8s_pod_name | Kubernetes Pod 名 |
k8s.namespace.name | k8s_namespace_name | Kubernetes 命名空间 |
k8s.cluster.id | k8s_cluster_id | TKE 集群 ID |
k8s.region | k8s_region | TKE 集群地域 |
k8s.pod.ip | k8s_pod_ip | Kubernetes Pod IP |
k8s.node.ip | k8s_node_ip | Kubernetes 节点 IP |
cvm.region | cvm_region | CVM 地域 |
cvm.instance.id | cvm_instance_id | CVM 实例 ID |
custom_key_1 | custom_key_1 | 自定义维度1 |
custom_key_2 | custom_key_2 | 自定义维度2 |
custom_key_3 | custom_key_3 | 自定义维度3 |
云 API 指标名称 | Prometheus 指标名称 | 类型 | 描述 | 单位 |
error_request_count | error_error_request_count | Gauge | 错误请求数 | - |
last_error_occur_time | error_last_error_occur_time | Gauge | 最后错误发生时间 | ms |
云 API 维度名称 | Prometheus 标签名称 | 描述 |
service.component | service_component | 组件类型 |
span.kind | span_kind | Span 类型 |
operation | operation | 接口名 |
error.object | error_object | 错误类型 |
peer.service | peer_service | 对端应用名 |
custom_key_1 | custom_key_1 | 自定义维度1 |
custom_key_2 | custom_key_2 | 自定义维度2 |
custom_key_3 | custom_key_3 | 自定义维度3 |
云 API 指标名称 | Prometheus 指标名称 | 类型 | 描述 | 单位 |
duration_avg | sql_duration_avg | Gauge | 平均耗时 | - |
last_error_occur_time | sql_last_error_occur_time | Gauge | 最后错误发生时间 | ms |
error_request_count | sql_error_request_count | Gauge | 错误请求数量 | ms |
request_count | sql_request_count | Gauge | 请求数量 | ms |
slow_sql_count | sql_slow_sql_count | Gauge | 慢 SQL 数量(>2000ms) | - |
云 API 维度名称 | Prometheus 标签名称 | 描述 |
service.component | service_component | 组件类型 |
span.kind | span_kind | Span 类型 |
db.statement | db_statement | 执行语句 |
db.instance | db_instance | 数据库的实例地址 |
db.ip | db_ip | IP 地址 |
db.operation | db_operation | 操作类型 |
error.object | error_object | 错误类型 |
db.system | db_system | 数据库类型 |
attack.subtype | attack_subtype | 注入类型 |
attack.symbol | attack_symbol | 注入标记:0 无注入,1 疑似注入 |
attack.level | attack_level | 注入等级:Critical、Important、Moderate、Low、info |
custom_key_1 | custom_key_1 | 自定义维度1 |
custom_key_2 | custom_key_2 | 自定义维度2 |
custom_key_3 | custom_key_3 | 自定义维度3 |
云 API 指标名称 | Prometheus 指标名称 | 类型 | 描述 | 单位 | 桶分布 |
duration_avg | mq_duration_avg | Gauge | 平均耗时 | ms | - |
error_request_count | mq_error_request_count | Gauge | 错误数量 | - | - |
request_count | mq_request_count | Gauge | 请求数 | - | - |
range_count_duration | 不支持 | Histogram | 耗时分布 | - | 0,1,5,10,50,100,200,300,400,500,600,700,800,900,1000,1500,2000,3000 |
云 API 维度名称 | Prometheus 标签名称 | 描述 |
component | component | 组件类型 |
span.kind | span_kind | Span 类型 |
peer.service | peer_service | 对端应用名 |
mq.topic | mq_topic | 消息队列 Topic 名称 |
mq.broker | mq_broker | 消息队列的 Broker 地址 |
operation | operation | 接口名 |
status.code | status_code | 请求状态 |
status_code_xx | status_code_xx | APM 处理后的状态码 |
error.object | error_object | 错误类型 |