指标名称
指标类型
指标单位
Help信息
指标描述
component.orm.sql.duration
Histogram
ms
Measures the duration of all sql requests by ORM.
ORM执行的SQL请求时间开销分组。默认bucket分组:
ORM
SQL
bucket
[ 1, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000, 30000, 60000 ]
component.orm.sql.total
Counter
Total processed sql requests.
已经执行完毕的SQL请求总数。
component.orm.sql.active
Gauge
Number of active sql requests.
当前正在处理的SQL请求数量。
component.orm.conn.max_open_connections
Maximum number of open connections to the database.
连接池设置的最大可连接数限制
component.orm.conn.open_connections
The number of established connections both in use and idle.
当前与数据库已建立的连接数
component.orm.conn.in_use
The number of connections currently in use.
当前正在使用的连接数
component.orm.conn.idle
The number of idle connections.
当前空闲的连接数
component.orm.conn.wait_count
The total number of connections waited for.
总共已等待的连接数
component.orm.conn.wait_duration
The total time blocked waiting for a new connection.
总共已等待连接的时长
component.orm.conn.max_idle_closed
The total number of connections closed due to SetMaxIdleConns.
由于超过MaxIdleConns配置上限而被自动关闭的连接数。
MaxIdleConns
component.orm.conn.max_idle_time_closed
The total number of connections closed due to SetConnMaxIdleTime.
由于超过ConnMaxIdleTime配置上限而被自动关闭的连接数。
ConnMaxIdleTime
component.orm.conn.max_left_time_closed
The total number of connections closed due to SetConnMaxLifetime.
由于超过ConnMaxLifetime配置上限而被自动关闭的连接数。
ConnMaxLifetime
具体每个指标包含哪些标签请查看sample文件。
sample
Label名称
Label描述
Label示例
orm.sql.type
DB.ExecContext;DB.QueryContext
DB.ExecContext
DB.QueryContext
orm.config.type
mysql;pgsql;mssql
mysql
pgsql
mssql
orm.config.group
default
orm.config.name
user
net.host.address
127.0.0.1
net.host.port
8000