Warning
Existing database instrumentations that are using
v1.24.0 of this document
(or prior) SHOULD NOT change the version of the database conventions that they emit
until a transition plan to the (future) stable semantic conventions has been published.
Conventions include, but are not limited to, attributes, metric and span names, and unit of measure.
Connection pools
The following metric instruments describe database client connection pool operations.
The number of connections that are currently in state described by the state attribute
Attribute
Type
Description
Examples
Requirement Level
pool.name
string
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The maximum number of idle open connections allowed
Attribute
Type
Description
Examples
Requirement Level
pool.name
string
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The minimum number of idle open connections allowed
Attribute
Type
Description
Examples
Requirement Level
pool.name
string
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The number of pending requests for an open connection, cumulative for the entire pool
Attribute
Type
Description
Examples
Requirement Level
pool.name
string
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The number of connection timeouts that have occurred trying to obtain a connection from the pool
Attribute
Type
Description
Examples
Requirement Level
pool.name
string
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The time it took to obtain an open connection from the pool
Attribute
Type
Description
Examples
Requirement Level
pool.name
string
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.
The time between borrowing a connection and returning it to the pool
Attribute
Type
Description
Examples
Requirement Level
pool.name
string
The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of server.address and server.port attributes formatted as server.address:server.port.