DBCP Connection Pool Monitoring

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

Table 1 DBCP 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 DBCP connection pool metrics

Category

Metric

Name

Description

Unit

Data Type

Default Aggregation Mode

Data source (dataSource)

url

url

url

-

ENUM

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

maxTotal

maxTotal

Maximum response time

-

INT

LAST

numIdle

numIdle

Number of idle connections

-

INT

LAST

numActive

numActive

Number of active connections

-

INT

LAST

maxWaitMillis

maxWaitMillis

Maximum time for a waiting connection to be reclaimed (when no connection is available) before an exception is thrown

-

INT

LAST

testOnCreate

testOnCreate

Whether to check the validity of a connection after it is created

-

STRING

LAST

testOnBorrow

testOnBorrow

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

-

STRING

LAST

testWhileIdle

testWhileIdle

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

-

STRING

LAST

timeBetweenEvictionRunsMillis

timeBetweenEvictionRunsMillis

If testOnBorrow is set to false and testWhileIdle is set to true, the application checks whether the idle time of a connection is greater than timeBetweenEvictionRunsMillis before obtaining the connection. If it is greater than that value, the application checks whether the connection is valid.

-

INT

LAST

removeAbandonedOnBorrow

removeAbandonedOnBorrow

Whether to remove discarded connections when obtaining connections. (The following conditions must be met: "getNumActive() > getMaxTotal() - 3" and "getNumIdle() < 2")

-

STRING

LAST

removeAbandonedOnMaintenance

removeAbandonedOnMaintenance

Whether to remove discarded connections in the maintenance cycle (when the eviction ends)

-

STRING

LAST

removeAbandonedTimeout

removeAbandonedTimeout

If a connection is not used within the specified timeout, it is regarded as a discarded connection and can be removed.

-

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

-

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 DBCP 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