Druid Connection Pool Monitoring

This section describes the types, names, and meanings of Druid connection pool metrics collected by APM.

Table 1 Druid connection pool collection parameters

Parameter

Data Type

Application Type

Default

Supported Start Agent Version

Supported End Agent Version

Description

Threshold (ms) for Reporting Connection Trace

integer

JAVA

1

2.1.3

-

Threshold for reporting getConnection method traces. If the threshold is not exceeded, such traces will not be reported.

Obtain Pool Info or Not

radio

JAVA

false

2.1.3

-

Whether to obtain pool information when getting connections

Table 2 Druid connection pool metrics

Category

Metric

Name

Description

Unit

Data Type

Default Aggregation Mode

Data source (dataSource)

url

url

url

-

ENUM

LAST

dbType

dbType

Database type

-

STRING

LAST

driverClassName

driverClassName

Driver

-

STRING

LAST

initialSize

initialSize

Number of initialized connections

-

INT

LAST

minIdle

minIdle

Minimum number of idle connections in the pool

-

INT

LAST

maxIdle

maxIdle

Maximum number of idle connections in the pool

-

INT

LAST

maxActive

maxActive

Maximum connection pool size

-

INT

LAST

waitThreadCount

waitThreadCount

Number of waiting threads

-

INT

LAST

maxWaitThreadCount

maxWaitThreadCount

Maximum number of waiting threads

-

INT

LAST

poolingCount

poolingCount

Number of connections in the pool

-

INT

LAST

poolingPeak

poolingPeak

Maximum number of connections in the pool

-

INT

MAX

activeCount

activeCount

Number of active connections

-

INT

LAST

activePeak

activePeak

Maximum number of active connections

-

INT

MAX

logicConnectCount

logicConnectCount

Total number of connections

-

INT

SUM

maxWait

maxWait

Maximum waiting time of a connection

-

INT

LAST

removeAbandoned

removeAbandoned

Whether to automatically reclaim timeout connections

-

STRING

LAST

removeAbandonedCount

removeAbandonedCount

Number of times that timeout connections are reclaimed

-

INT

LAST

removeAbandonedTimeoutMillis

removeAbandonedTimeoutMillis

If a connection in the pool is not returned within the specified duration, the connection will be reclaimed.

-

INT

LAST

testWhileIdle

testWhileIdle

Whether to verify the validity of an idle connection when an application applies for it from the pool

-

STRING

LAST

testOnBorrow

testOnBorrow

Check whether a connection is valid before obtaining it from the connection pool.

-

STRING

LAST

testOnReturn

testOnReturn

Whether to verify the validity of a connection when it is returned

-

STRING

LAST

minEvictableIdleTimeMillis

minEvictableIdleTimeMillis

Idle time that is allowed for connections in the pool

ms

INT

LAST

timeBetweenEvictionRunsMillis

timeBetweenEvictionRunsMillis

Interval for checking the validity of idle connections

-

INT

LAST

Connection details (connection)

url

url

Connection address

-

ENUM

LAST

invokeCount

invokeCount

Number of calls

-

INT

SUM

totalTime

totalTime

Total time

-

INT

SUM

errorCount

errorCount

Number of errors

-

INT

SUM

maxTime

maxTime

Maximum response time

ms

INT

SUM

range1

range1

Number of requests with 0-10 ms response time

-

INT

SUM

range2

range2

Number of requests with 10-100 ms response time

-

INT

SUM

range3

range3

Number of requests with 100-500 ms response time

-

INT

SUM

range4

range4

Number of requests with 500-1000 ms response time

-

INT

SUM

range5

range5

Number of requests with 1-10s response time

-

INT

SUM

range6

range6

Number of requests with response time longer than 10s

-

INT

SUM

concurrentMax

concurrentMax

Maximum concurrency

-

INT

MAX

Version (version)

version

version

Version

-

STRING

LAST

Exception (exception: exception statistics of Druid calls)

exceptionType

exceptionType

Exception type

-

ENUM

LAST

causeType

causeType

Exception class

-

ENUM

LAST

count

count

Number of times the exception has occurred

-

INT

SUM

message

message

Message returned when the exception occurred

-

STRING

LAST

stackTrace

stackTrace

Exception stack information

-

CLOB

LAST