Updated on 2024-07-04 GMT+08:00

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

Database Type

Database type

-

STRING

LAST

driverClassName

Driver

Driver

-

STRING

LAST

initialSize

Initialized Connections

Number of initialized connections

-

INT

LAST

minIdle

Min. Idle Connections

Minimum number of idle connections in the pool

-

INT

LAST

maxIdle

Max. Idle Connections

Maximum number of idle connections in the pool

ms

INT

LAST

maxActive

Max. Pool Size

Maximum connection pool size

-

INT

LAST

waitThreadCount

Waiting Threads

Number of waiting threads

-

INT

LAST

maxWaitThreadCount

Max. Waiting Threads

Maximum number of waiting threads

-

INT

LAST

poolingCount

Pool Connections

Number of connections in the pool

-

INT

LAST

poolingPeak

Max. Pool Connections

Maximum number of connections in the pool

-

INT

MAX

activeCount

Active Connections

Number of active connections

-

INT

LAST

activePeak

Max. Active Connections

Maximum number of active connections

-

INT

MAX

logicConnectCount

Total Connections

Total number of connections

-

INT

SUM

maxWait

Max. Waiting Time

Maximum waiting time of a connection

-

INT

LAST

removeAbandoned

Automatically Reclaim Timeout Connections

Whether to automatically reclaim timeout connections

-

STRING

LAST

removeAbandonedCount

Timeout Connection Reclaims

Number of times that timeout connections are reclaimed

-

INT

LAST

removeAbandonedTimeoutMillis

Max. Connection Usage Duration

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

-

INT

LAST

testWhileIdle

Idle Connection Validity Check

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

-

STRING

LAST

testOnBorrow

Validity Check Before Obtaining Connection

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

-

STRING

LAST

testOnReturn

Validity Check Upon Connection Return

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

-

STRING

LAST

minEvictableIdleTimeMillis

Allowed Idle Time for Connection

Idle time that is allowed for connections in the pool

ms

INT

LAST

timeBetweenEvictionRunsMillis

Interval for Checking Idle Connection Validity

Interval for checking the validity of idle connections

-

INT

LAST

Connection details (connection)

url

Connection Address

Connection address

-

ENUM

LAST

invokeCount

Calls

Number of calls

-

INT

SUM

totalTime

Total Time

Total time

-

INT

SUM

errorCount

Errors

Number of errors

-

INT

SUM

maxTime

Max. RT

Maximum response time

ms

INT

SUM

range1

0–10 ms

Number of requests with 0–10 ms response time

-

INT

SUM

range2

10–100 ms

Number of requests with 10–100 ms response time

-

INT

SUM

range3

100–500 ms

Number of requests with 100–500 ms response time

-

INT

SUM

range4

500–1000 ms

Number of requests with 500–1000 ms response time

-

INT

SUM

range5

1–10s

Number of requests with 1–10s response time

-

INT

SUM

range6

> 10s

Number of requests with response time longer than 10s

-

INT

SUM

concurrentMax

Max. Concurrency

Maximum concurrency

-

INT

MAX

Version (version)

version

Version

Version

-

STRING

LAST

Exception (exception: exception statistics of Druid calls)

exceptionType

Exception Type

Exception type

-

ENUM

LAST

causeType

Exception Class

Exception class

-

ENUM

LAST

count

Count

Number of times the exception has occurred

-

INT

SUM

message

Exception Message

Message returned when the exception occurred

-

STRING

LAST

stackTrace

Exception Stack

Exception stack information

-

CLOB

LAST