Updated on 2023-08-02 GMT+08:00

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

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

-

INT

LAST

maxTotal

Max. RT

Maximum response time

-

INT

LAST

numIdle

Idle Connections

Number of idle connections

-

INT

LAST

numActive

Active Connections

Number of active connections

-

INT

LAST

maxWaitMillis

Max. Time for Waiting Connection to Be Reclaimed

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

-

INT

LAST

testOnCreate

Validity Check Upon Connection Creation

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

-

STRING

LAST

testOnBorrow

Validity Check Before Obtaining Connection

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

-

STRING

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

timeBetweenEvictionRunsMillis

Interval for Checking Connection Validity

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

Remove Discarded Connections When Obtaining Connections

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

-

STRING

LAST

removeAbandonedOnMaintenance

Remove Discarded Connections During Maintenance

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

-

STRING

LAST

removeAbandonedTimeout

Connection Removal Timeout

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

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

-

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

-

STRING

LAST

stackTrace

Exception Stack

Exception stack information

-

CLOB

LAST