Module: OpenTelemetry::SemConv::Incubating::DB
- Defined in:
- lib/opentelemetry/semconv/incubating/db/metrics.rb,
lib/opentelemetry/semconv/incubating/db/attributes.rb
Metrics Names collapse
- DB_CLIENT_CONNECTION_COUNT =
Note:
Stability Level: development
The number of connections that are currently in state described by the
state
attribute 'db.client.connection.count'
- DB_CLIENT_CONNECTION_CREATE_TIME =
Note:
Stability Level: development
The time it took to create a new connection
'db.client.connection.create_time'
- DB_CLIENT_CONNECTION_IDLE_MAX =
Note:
Stability Level: development
The maximum number of idle open connections allowed
'db.client.connection.idle.max'
- DB_CLIENT_CONNECTION_IDLE_MIN =
Note:
Stability Level: development
The minimum number of idle open connections allowed
'db.client.connection.idle.min'
- DB_CLIENT_CONNECTION_MAX =
Note:
Stability Level: development
The maximum number of open connections allowed
'db.client.connection.max'
- DB_CLIENT_CONNECTION_PENDING_REQUESTS =
Note:
Stability Level: development
The number of current pending requests for an open connection
'db.client.connection.pending_requests'
- DB_CLIENT_CONNECTION_TIMEOUTS =
Note:
Stability Level: development
The number of connection timeouts that have occurred trying to obtain a connection from the pool
'db.client.connection.timeouts'
- DB_CLIENT_CONNECTION_USE_TIME =
Note:
Stability Level: development
The time between borrowing a connection and returning it to the pool
'db.client.connection.use_time'
- DB_CLIENT_CONNECTION_WAIT_TIME =
Note:
Stability Level: development
The time it took to obtain an open connection from the pool
'db.client.connection.wait_time'
- DB_CLIENT_CONNECTIONS_CREATE_TIME =
Deprecated.
“Replaced by
db.client.connection.create_time
with units
.”, “reason”: “uncategorized”Note:Stability Level: development
Deprecated, use
db.client.connection.create_time
instead. Note: the unit also changed fromms
tos
. 'db.client.connections.create_time'
- DB_CLIENT_CONNECTIONS_IDLE_MAX =
Deprecated.
“Replaced by
db.client.connection.idle.max
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.idle.max”Note:Stability Level: development
Deprecated, use
db.client.connection.idle.max
instead. 'db.client.connections.idle.max'
- DB_CLIENT_CONNECTIONS_IDLE_MIN =
Deprecated.
“Replaced by
db.client.connection.idle.min
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.idle.min”Note:Stability Level: development
Deprecated, use
db.client.connection.idle.min
instead. 'db.client.connections.idle.min'
- DB_CLIENT_CONNECTIONS_MAX =
Deprecated.
“Replaced by
db.client.connection.max
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.max”Note:Stability Level: development
Deprecated, use
db.client.connection.max
instead. 'db.client.connections.max'
- DB_CLIENT_CONNECTIONS_PENDING_REQUESTS =
Deprecated.
“Replaced by
db.client.connection.pending_requests
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.pending_requests”Note:Stability Level: development
Deprecated, use
db.client.connection.pending_requests
instead. 'db.client.connections.pending_requests'
- DB_CLIENT_CONNECTIONS_TIMEOUTS =
Deprecated.
“Replaced by
db.client.connection.timeouts
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.timeouts”Note:Stability Level: development
Deprecated, use
db.client.connection.timeouts
instead. 'db.client.connections.timeouts'
- DB_CLIENT_CONNECTIONS_USAGE =
Deprecated.
“Replaced by
db.client.connection.count
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.count”Note:Stability Level: development
Deprecated, use
db.client.connection.count
instead. 'db.client.connections.usage'
- DB_CLIENT_CONNECTIONS_USE_TIME =
Deprecated.
“Replaced by
db.client.connection.use_time
with units
.”, “reason”: “uncategorized”Note:Stability Level: development
Deprecated, use
db.client.connection.use_time
instead. Note: the unit also changed fromms
tos
. 'db.client.connections.use_time'
- DB_CLIENT_CONNECTIONS_WAIT_TIME =
Deprecated.
“Replaced by
db.client.connection.wait_time
with units
.”, “reason”: “uncategorized”Note:Stability Level: development
Deprecated, use
db.client.connection.wait_time
instead. Note: the unit also changed fromms
tos
. 'db.client.connections.wait_time'
- DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT =
Deprecated.
“Replaced by
azure.cosmosdb.client.active_instance.count
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.client.active_instance.count”Note:Stability Level: development
Deprecated, use
azure.cosmosdb.client.active_instance.count
instead. 'db.client.cosmosdb.active_instance.count'
- DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE =
Deprecated.
“Replaced by
azure.cosmosdb.client.operation.request_charge
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.client.operation.request_charge”Note:Stability Level: development
Deprecated, use
azure.cosmosdb.client.operation.request_charge
instead. 'db.client.cosmosdb.operation.request_charge'
- DB_CLIENT_OPERATION_DURATION =
Deprecated.
Now available in the stable namespace at DB::DB_CLIENT_OPERATION_DURATION.
Note:Stability Level: stable
Duration of database client operations.
Batch operations SHOULD be recorded as a single operation.
'db.client.operation.duration'
- DB_CLIENT_RESPONSE_RETURNED_ROWS =
Note:
Stability Level: development
The actual number of records returned by the database operation.
'db.client.response.returned_rows'
Attribute Names collapse
- DB_CASSANDRA_CONSISTENCY_LEVEL =
Deprecated.
“Replaced by
cassandra.consistency.level
.”, “reason”: “renamed”, “renamed_to”: “cassandra.consistency.level”Note:Stability Level: development
Deprecated, use
cassandra.consistency.level
instead. 'db.cassandra.consistency_level'
- DB_CASSANDRA_COORDINATOR_DC =
Deprecated.
“Replaced by
cassandra.coordinator.dc
.”, “reason”: “renamed”, “renamed_to”: “cassandra.coordinator.dc”Note:Stability Level: development
Deprecated, use
cassandra.coordinator.dc
instead. 'db.cassandra.coordinator.dc'
- DB_CASSANDRA_COORDINATOR_ID =
Deprecated.
“Replaced by
cassandra.coordinator.id
.”, “reason”: “renamed”, “renamed_to”: “cassandra.coordinator.id”Note:Stability Level: development
Deprecated, use
cassandra.coordinator.id
instead. 'db.cassandra.coordinator.id'
- DB_CASSANDRA_IDEMPOTENCE =
Deprecated.
“Replaced by
cassandra.query.idempotent
.”, “reason”: “renamed”, “renamed_to”: “cassandra.query.idempotent”Note:Stability Level: development
Deprecated, use
cassandra.query.idempotent
instead. 'db.cassandra.idempotence'
- DB_CASSANDRA_PAGE_SIZE =
Deprecated.
“Replaced by
cassandra.page.size
.”, “reason”: “renamed”, “renamed_to”: “cassandra.page.size”Note:Stability Level: development
Deprecated, use
cassandra.page.size
instead. 'db.cassandra.page_size'
- DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT =
Deprecated.
“Replaced by
cassandra.speculative_execution.count
.”, “reason”: “renamed”, “renamed_to”: “cassandra.speculative_execution.count”Note:Stability Level: development
Deprecated, use
cassandra.speculative_execution.count
instead. 'db.cassandra.speculative_execution_count'
- DB_CASSANDRA_TABLE =
Deprecated.
“Replaced by
db.collection.name
.”, “reason”: “renamed”, “renamed_to”: “db.collection.name”Note:Stability Level: development
Deprecated, use
db.collection.name
instead. 'db.cassandra.table'
- DB_CLIENT_CONNECTION_POOL_NAME =
Note:
Stability Level: development
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 parameters that would make the name unique, for example, combining attributes
server.address
,server.port
, anddb.namespace
, formatted asserver.address:server.port/db.namespace
. Instrumentations that generate connection pool name following different patterns SHOULD document it. 'db.client.connection.pool.name'
- DB_CLIENT_CONNECTION_STATE =
Note:
Stability Level: development
The state of a connection in the pool
'db.client.connection.state'
- DB_CLIENT_CONNECTIONS_POOL_NAME =
Deprecated.
“Replaced by
db.client.connection.pool.name
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.pool.name”Note:Stability Level: development
Deprecated, use
db.client.connection.pool.name
instead. 'db.client.connections.pool.name'
- DB_CLIENT_CONNECTIONS_STATE =
Deprecated.
“Replaced by
db.client.connection.state
.”, “reason”: “renamed”, “renamed_to”: “db.client.connection.state”Note:Stability Level: development
Deprecated, use
db.client.connection.state
instead. 'db.client.connections.state'
- DB_COLLECTION_NAME =
Deprecated.
Now available in the stable namespace at DB::DB_COLLECTION_NAME.
Note:Stability Level: stable
The name of a collection (table, container) within the database.
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
The collection name SHOULD NOT be extracted from
db.query.text
, when the database system supports query text with multiple collections in non-batch operations.For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used.
'db.collection.name'
- DB_CONNECTION_STRING =
Deprecated.
“Replaced by
server.address
andserver.port
.\n”, “reason”: “uncategorized”Note:Stability Level: development
Deprecated, use
server.address
,server.port
attributes instead. 'db.connection_string'
- DB_COSMOSDB_CLIENT_ID =
Deprecated.
“Replaced by
azure.client.id
.”, “reason”: “renamed”, “renamed_to”: “azure.client.id”Note:Stability Level: development
Deprecated, use
azure.client.id
instead. 'db.cosmosdb.client_id'
- DB_COSMOSDB_CONNECTION_MODE =
Deprecated.
“Replaced by
azure.cosmosdb.connection.mode
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.connection.mode”Note:Stability Level: development
Deprecated, use
azure.cosmosdb.connection.mode
instead. 'db.cosmosdb.connection_mode'
- DB_COSMOSDB_CONSISTENCY_LEVEL =
Deprecated.
“Replaced by
azure.cosmosdb.consistency.level
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.consistency.level”Note:Stability Level: development
Deprecated, use
cosmosdb.consistency.level
instead. 'db.cosmosdb.consistency_level'
- DB_COSMOSDB_CONTAINER =
Deprecated.
“Replaced by
db.collection.name
.”, “reason”: “renamed”, “renamed_to”: “db.collection.name”Note:Stability Level: development
Deprecated, use
db.collection.name
instead. 'db.cosmosdb.container'
- DB_COSMOSDB_OPERATION_TYPE =
Deprecated.
“Removed, no replacement at this time.\n”, “reason”: “obsoleted”
Note:Stability Level: development
Deprecated, no replacement at this time.
'db.cosmosdb.operation_type'
- DB_COSMOSDB_REGIONS_CONTACTED =
Deprecated.
“Replaced by
azure.cosmosdb.operation.contacted_regions
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.operation.contacted_regions”Note:Stability Level: development
Deprecated, use
azure.cosmosdb.operation.contacted_regions
instead. 'db.cosmosdb.regions_contacted'
- DB_COSMOSDB_REQUEST_CHARGE =
Deprecated.
“Replaced by
azure.cosmosdb.operation.request_charge
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.operation.request_charge”Note:Stability Level: development
Deprecated, use
azure.cosmosdb.operation.request_charge
instead. 'db.cosmosdb.request_charge'
- DB_COSMOSDB_REQUEST_CONTENT_LENGTH =
Deprecated.
“Replaced by
azure.cosmosdb.request.body.size
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.request.body.size”Note:Stability Level: development
Deprecated, use
azure.cosmosdb.request.body.size
instead. 'db.cosmosdb.request_content_length'
- DB_COSMOSDB_STATUS_CODE =
Deprecated.
“Replaced by
db.response.status_code
.”, “reason”: “renamed”, “renamed_to”: “db.response.status_code”Note:Stability Level: development
Deprecated, use
db.response.status_code
instead. 'db.cosmosdb.status_code'
- DB_COSMOSDB_SUB_STATUS_CODE =
Deprecated.
“Replaced by
azure.cosmosdb.response.sub_status_code
.”, “reason”: “renamed”, “renamed_to”: “azure.cosmosdb.response.sub_status_code”Note:Stability Level: development
Deprecated, use
azure.cosmosdb.response.sub_status_code
instead. 'db.cosmosdb.sub_status_code'
- DB_ELASTICSEARCH_CLUSTER_NAME =
Deprecated.
“Replaced by
db.namespace
.”, “reason”: “renamed”, “renamed_to”: “db.namespace”Note:Stability Level: development
Deprecated, use
db.namespace
instead. 'db.elasticsearch.cluster.name'
- DB_ELASTICSEARCH_NODE_NAME =
Deprecated.
“Replaced by
elasticsearch.node.name
.”, “reason”: “renamed”, “renamed_to”: “elasticsearch.node.name”Note:Stability Level: development
Deprecated, use
elasticsearch.node.name
instead. 'db.elasticsearch.node.name'
- DB_ELASTICSEARCH_PATH_PARTS_LAMBDA =
Deprecated.
“Replaced by
db.operation.parameter
.”, “reason”: “renamed”, “renamed_to”: “db.operation.parameter”Note:Stability Level: development
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
Deprecated, use
db.operation.parameter
instead. ->(key) { "db.elasticsearch.path_parts.#{key}" }
- DB_INSTANCE_ID =
Deprecated.
“Removed, no general replacement at this time. For Elasticsearch, use
db.elasticsearch.node.name
instead.\n”, “reason”: “obsoleted”Note:Stability Level: development
Deprecated, no general replacement at this time. For Elasticsearch, use
db.elasticsearch.node.name
instead. 'db.instance.id'
- DB_JDBC_DRIVER_CLASSNAME =
Deprecated.
“Removed, no replacement at this time.\n”, “reason”: “obsoleted”
Note:Stability Level: development
Removed, no replacement at this time.
'db.jdbc.driver_classname'
- DB_MONGODB_COLLECTION =
Deprecated.
“Replaced by
db.collection.name
.”, “reason”: “renamed”, “renamed_to”: “db.collection.name”Note:Stability Level: development
Deprecated, use
db.collection.name
instead. 'db.mongodb.collection'
- DB_MSSQL_INSTANCE_NAME =
Deprecated.
“Removed, no replacement at this time.”, “reason”: “obsoleted”
Note:Stability Level: development
Deprecated, SQL Server instance is now populated as a part of
db.namespace
attribute. 'db.mssql.instance_name'
- DB_NAME =
Deprecated.
“Replaced by
db.namespace
.”, “reason”: “renamed”, “renamed_to”: “db.namespace”Note:Stability Level: development
Deprecated, use
db.namespace
instead. 'db.name'
- DB_NAMESPACE =
Deprecated.
Now available in the stable namespace at DB::DB_NAMESPACE.
Note:Stability Level: stable
The name of the database, fully qualified within the server address and port.
If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using
|
as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted. Semantic conventions for individual database systems SHOULD document whatdb.namespace
means in the context of that system. It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. 'db.namespace'
- DB_OPERATION =
Deprecated.
“Replaced by
db.operation.name
.”, “reason”: “renamed”, “renamed_to”: “db.operation.name”Note:Stability Level: development
Deprecated, use
db.operation.name
instead. 'db.operation'
- DB_OPERATION_BATCH_SIZE =
Deprecated.
Now available in the stable namespace at DB::DB_OPERATION_BATCH_SIZE.
Note:Stability Level: stable
The number of queries included in a batch operation.
Operations are only considered batches when they contain two or more operations, and so
db.operation.batch.size
SHOULD never be1
. 'db.operation.batch.size'
- DB_OPERATION_NAME =
Deprecated.
Now available in the stable namespace at DB::DB_OPERATION_NAME.
Note:Stability Level: stable
The name of the operation or command being executed.
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
The operation name SHOULD NOT be extracted from
db.query.text
, when the database system supports query text with multiple operations in non-batch operations.If spaces can occur in the operation name, multiple consecutive spaces SHOULD be normalized to a single space.
For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by
BATCH
, otherwisedb.operation.name
SHOULD beBATCH
or some other database system specific term if more applicable. 'db.operation.name'
- DB_OPERATION_PARAMETER_LAMBDA =
Note:
Stability Level: development
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
A database operation parameter, with
<key>
being the parameter name, and the attribute value being a string representation of the parameter value.For example, a client-side maximum number of rows to read from the database MAY be recorded as the
db.operation.parameter.max_rows
attribute.db.query.text
parameters SHOULD be captured usingdb.query.parameter.<key>
instead ofdb.operation.parameter.<key>
. ->(key) { "db.operation.parameter.#{key}" }
- DB_QUERY_PARAMETER_LAMBDA =
Note:
Stability Level: development
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
A database query parameter, with
<key>
being the parameter name, and the attribute value being a string representation of the parameter value.If a query parameter has no name and instead is referenced only by index, then
<key>
SHOULD be the 0-based index.db.query.parameter.<key>
SHOULD match up with the parameterized placeholders present indb.query.text
.db.query.parameter.<key>
SHOULD NOT be captured on batch operations.Examples:
- For a query
SELECT * FROM users where username = %s
with the parameter"jdoe"
, the attributedb.query.parameter.0
SHOULD be set to"jdoe"
. - For a query
"SELECT * FROM users WHERE username = %(username)s;
with parameterusername = "jdoe"
, the attributedb.query.parameter.username
SHOULD be set to"jdoe"
.
- For a query
->(key) { "db.query.parameter.#{key}" }
- DB_QUERY_SUMMARY =
Deprecated.
Now available in the stable namespace at DB::DB_QUERY_SUMMARY.
Note:Stability Level: stable
Low cardinality summary of a database query.
The query summary describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries.
Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following Generating query summary section.
'db.query.summary'
- DB_QUERY_TEXT =
Deprecated.
Now available in the stable namespace at DB::DB_QUERY_TEXT.
Note:Stability Level: stable
The database query being executed.
For sanitization see Sanitization of
db.query.text
. For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator;
or some other database system specific separator if more applicable. Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. 'db.query.text'
- DB_REDIS_DATABASE_INDEX =
Deprecated.
“Replaced by
db.namespace
.”, “reason”: “renamed”, “renamed_to”: “db.namespace”Note:Stability Level: development
Deprecated, use
db.namespace
instead. 'db.redis.database_index'
- DB_RESPONSE_RETURNED_ROWS =
Note:
Stability Level: development
Number of rows returned by the operation.
'db.response.returned_rows'
- DB_RESPONSE_STATUS_CODE =
Deprecated.
Now available in the stable namespace at DB::DB_RESPONSE_STATUS_CODE.
Note:Stability Level: stable
Database response status code.
The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what
db.response.status_code
means in the context of that system. 'db.response.status_code'
- DB_SQL_TABLE =
Deprecated.
“Replaced by
db.collection.name
, but only if not extracting the value fromdb.query.text
.”, “reason”: “uncategorized”Note:Stability Level: development
Deprecated, use
db.collection.name
instead. 'db.sql.table'
- DB_STATEMENT =
Deprecated.
“Replaced by
db.query.text
.”, “reason”: “renamed”, “renamed_to”: “db.query.text”Note:Stability Level: development
The database statement being executed.
'db.statement'
- DB_STORED_PROCEDURE_NAME =
Deprecated.
Now available in the stable namespace at DB::DB_STORED_PROCEDURE_NAME.
Note:Stability Level: stable
The name of a stored procedure within the database.
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
For batch operations, if the individual operations are known to have the same stored procedure name then that stored procedure name SHOULD be used.
'db.stored_procedure.name'
- DB_SYSTEM =
Deprecated.
“Replaced by
db.system.name
.”, “reason”: “renamed”, “renamed_to”: “db.system.name”Note:Stability Level: development
Deprecated, use
db.system.name
instead. 'db.system'
- DB_SYSTEM_NAME =
Deprecated.
Now available in the stable namespace at DB::DB_SYSTEM_NAME.
Note:Stability Level: stable
The database management system (DBMS) product as identified by the client instrumentation.
The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the
db.system.name
is set topostgresql
based on the instrumentation’s best knowledge. 'db.system.name'
- DB_USER =
Deprecated.
“Removed, no replacement at this time.”, “reason”: “obsoleted”
Note:Stability Level: development
Deprecated, no replacement at this time.
'db.user'