View Source OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics (OpenTelemetry.SemConv v1.27.0)
OpenTelemetry Semantic Conventions for DB metrics.
Summary
Functions
The number of connections that are currently in state described by the state
attribute
The time it took to create a new connection
The maximum number of idle open connections allowed
The minimum number of idle open connections allowed
The maximum number of open connections allowed
The number of pending requests for an open connection, cumulative for the entire pool
The number of connection timeouts that have occurred trying to obtain a connection from the pool
The time between borrowing a connection and returning it to the pool
The time it took to obtain an open connection from the pool
Duration of database client operations.
Functions
@spec db_client_connection_count() :: :"db.client.connection.count"
The number of connections that are currently in state described by the state
attribute
Instrument: updowncounter
Unit: {connection}
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_count()
:"db.client.connection.count"
?DB_CLIENT_CONNECTION_COUNT.
'db.client.connection.count'
@spec db_client_connection_create_time() :: :"db.client.connection.create_time"
The time it took to create a new connection
Instrument: histogram
Unit: s
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_create_time()
:"db.client.connection.create_time"
?DB_CLIENT_CONNECTION_CREATE_TIME.
'db.client.connection.create_time'
@spec db_client_connection_idle_max() :: :"db.client.connection.idle.max"
The maximum number of idle open connections allowed
Instrument: updowncounter
Unit: {connection}
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_idle_max()
:"db.client.connection.idle.max"
?DB_CLIENT_CONNECTION_IDLE_MAX.
'db.client.connection.idle.max'
@spec db_client_connection_idle_min() :: :"db.client.connection.idle.min"
The minimum number of idle open connections allowed
Instrument: updowncounter
Unit: {connection}
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_idle_min()
:"db.client.connection.idle.min"
?DB_CLIENT_CONNECTION_IDLE_MIN.
'db.client.connection.idle.min'
@spec db_client_connection_max() :: :"db.client.connection.max"
The maximum number of open connections allowed
Instrument: updowncounter
Unit: {connection}
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_max()
:"db.client.connection.max"
?DB_CLIENT_CONNECTION_MAX.
'db.client.connection.max'
@spec db_client_connection_pending_requests() ::
:"db.client.connection.pending_requests"
The number of pending requests for an open connection, cumulative for the entire pool
Instrument: updowncounter
Unit: {request}
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_pending_requests()
:"db.client.connection.pending_requests"
?DB_CLIENT_CONNECTION_PENDING_REQUESTS.
'db.client.connection.pending_requests'
@spec db_client_connection_timeouts() :: :"db.client.connection.timeouts"
The number of connection timeouts that have occurred trying to obtain a connection from the pool
Instrument: counter
Unit: {timeout}
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_timeouts()
:"db.client.connection.timeouts"
?DB_CLIENT_CONNECTION_TIMEOUTS.
'db.client.connection.timeouts'
@spec db_client_connection_use_time() :: :"db.client.connection.use_time"
The time between borrowing a connection and returning it to the pool
Instrument: histogram
Unit: s
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_use_time()
:"db.client.connection.use_time"
?DB_CLIENT_CONNECTION_USE_TIME.
'db.client.connection.use_time'
@spec db_client_connection_wait_time() :: :"db.client.connection.wait_time"
The time it took to obtain an open connection from the pool
Instrument: histogram
Unit: s
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_wait_time()
:"db.client.connection.wait_time"
?DB_CLIENT_CONNECTION_WAIT_TIME.
'db.client.connection.wait_time'
@spec db_client_connections_create_time() :: :"db.client.connections.create_time"
@spec db_client_connections_idle_max() :: :"db.client.connections.idle.max"
@spec db_client_connections_idle_min() :: :"db.client.connections.idle.min"
@spec db_client_connections_max() :: :"db.client.connections.max"
@spec db_client_connections_pending_requests() ::
:"db.client.connections.pending_requests"
@spec db_client_connections_timeouts() :: :"db.client.connections.timeouts"
@spec db_client_connections_usage() :: :"db.client.connections.usage"
@spec db_client_connections_use_time() :: :"db.client.connections.use_time"
@spec db_client_connections_wait_time() :: :"db.client.connections.wait_time"
@spec db_client_operation_duration() :: :"db.client.operation.duration"
Duration of database client operations.
Instrument: histogram
Unit: s
Notes
Batch operations SHOULD be recorded as a single operation.
iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_operation_duration()
:"db.client.operation.duration"
?DB_CLIENT_OPERATION_DURATION.
'db.client.operation.duration'