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
stateattribute. '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_timewith units.Note:Stability Level: development
Deprecated, use
db.client.connection.create_timeinstead. Note: the unit also changed frommstos. 'db.client.connections.create_time'- DB_CLIENT_CONNECTIONS_IDLE_MAX =
Deprecated.
Replaced by
db.client.connection.idle.max.Note:Stability Level: development
Deprecated, use
db.client.connection.idle.maxinstead. 'db.client.connections.idle.max'- DB_CLIENT_CONNECTIONS_IDLE_MIN =
Deprecated.
Replaced by
db.client.connection.idle.min.Note:Stability Level: development
Deprecated, use
db.client.connection.idle.mininstead. 'db.client.connections.idle.min'- DB_CLIENT_CONNECTIONS_MAX =
Deprecated.
Replaced by
db.client.connection.max.Note:Stability Level: development
Deprecated, use
db.client.connection.maxinstead. 'db.client.connections.max'- DB_CLIENT_CONNECTIONS_PENDING_REQUESTS =
Deprecated.
Replaced by
db.client.connection.pending_requests.Note:Stability Level: development
Deprecated, use
db.client.connection.pending_requestsinstead. 'db.client.connections.pending_requests'- DB_CLIENT_CONNECTIONS_TIMEOUTS =
Deprecated.
Replaced by
db.client.connection.timeouts.Note:Stability Level: development
Deprecated, use
db.client.connection.timeoutsinstead. 'db.client.connections.timeouts'- DB_CLIENT_CONNECTIONS_USAGE =
Deprecated.
Replaced by
db.client.connection.count.Note:Stability Level: development
Deprecated, use
db.client.connection.countinstead. 'db.client.connections.usage'- DB_CLIENT_CONNECTIONS_USE_TIME =
Deprecated.
Replaced by
db.client.connection.use_timewith units.Note:Stability Level: development
Deprecated, use
db.client.connection.use_timeinstead. Note: the unit also changed frommstos. 'db.client.connections.use_time'- DB_CLIENT_CONNECTIONS_WAIT_TIME =
Deprecated.
Replaced by
db.client.connection.wait_timewith units.Note:Stability Level: development
Deprecated, use
db.client.connection.wait_timeinstead. Note: the unit also changed frommstos. 'db.client.connections.wait_time'- DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT =
Deprecated.
Replaced by
azure.cosmosdb.client.active_instance.count.Note:Stability Level: development
Deprecated, use
azure.cosmosdb.client.active_instance.countinstead. 'db.client.cosmosdb.active_instance.count'- DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE =
Deprecated.
Replaced by
azure.cosmosdb.client.operation.request_charge.Note:Stability Level: development
Deprecated, use
azure.cosmosdb.client.operation.request_chargeinstead. '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.Note:Stability Level: development
Deprecated, use
cassandra.consistency.levelinstead. 'db.cassandra.consistency_level'- DB_CASSANDRA_COORDINATOR_DC =
Deprecated.
Replaced by
cassandra.coordinator.dc.Note:Stability Level: development
Deprecated, use
cassandra.coordinator.dcinstead. 'db.cassandra.coordinator.dc'- DB_CASSANDRA_COORDINATOR_ID =
Deprecated.
Replaced by
cassandra.coordinator.id.Note:Stability Level: development
Deprecated, use
cassandra.coordinator.idinstead. 'db.cassandra.coordinator.id'- DB_CASSANDRA_IDEMPOTENCE =
Deprecated.
Replaced by
cassandra.query.idempotent.Note:Stability Level: development
Deprecated, use
cassandra.query.idempotentinstead. 'db.cassandra.idempotence'- DB_CASSANDRA_PAGE_SIZE =
Deprecated.
Replaced by
cassandra.page.size.Note:Stability Level: development
Deprecated, use
cassandra.page.sizeinstead. 'db.cassandra.page_size'- DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT =
Deprecated.
Replaced by
cassandra.speculative_execution.count.Note:Stability Level: development
Deprecated, use
cassandra.speculative_execution.countinstead. 'db.cassandra.speculative_execution_count'- DB_CASSANDRA_TABLE =
Deprecated.
Replaced by
db.collection.name.Note:Stability Level: development
Deprecated, use
db.collection.nameinstead. '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.Note:Stability Level: development
Deprecated, use
db.client.connection.pool.nameinstead. 'db.client.connections.pool.name'- DB_CLIENT_CONNECTIONS_STATE =
Deprecated.
Replaced by
db.client.connection.state.Note:Stability Level: development
Deprecated, use
db.client.connection.stateinstead. '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.addressandserver.port.Note:Stability Level: development
Deprecated, use
server.address,server.portattributes instead. 'db.connection_string'- DB_COSMOSDB_CLIENT_ID =
Deprecated.
Replaced by
azure.client.id.Note:Stability Level: development
Deprecated, use
azure.client.idinstead. 'db.cosmosdb.client_id'- DB_COSMOSDB_CONNECTION_MODE =
Deprecated.
Replaced by
azure.cosmosdb.connection.mode.Note:Stability Level: development
Deprecated, use
azure.cosmosdb.connection.modeinstead. 'db.cosmosdb.connection_mode'- DB_COSMOSDB_CONSISTENCY_LEVEL =
Deprecated.
Replaced by
azure.cosmosdb.consistency.level.Note:Stability Level: development
Deprecated, use
cosmosdb.consistency.levelinstead. 'db.cosmosdb.consistency_level'- DB_COSMOSDB_CONTAINER =
Deprecated.
Replaced by
db.collection.name.Note:Stability Level: development
Deprecated, use
db.collection.nameinstead. 'db.cosmosdb.container'- DB_COSMOSDB_OPERATION_TYPE =
Deprecated.
Removed, no replacement at this time.
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.Note:Stability Level: development
Deprecated, use
azure.cosmosdb.operation.contacted_regionsinstead. 'db.cosmosdb.regions_contacted'- DB_COSMOSDB_REQUEST_CHARGE =
Deprecated.
Replaced by
azure.cosmosdb.operation.request_charge.Note:Stability Level: development
Deprecated, use
azure.cosmosdb.operation.request_chargeinstead. 'db.cosmosdb.request_charge'- DB_COSMOSDB_REQUEST_CONTENT_LENGTH =
Deprecated.
Replaced by
azure.cosmosdb.request.body.size.Note:Stability Level: development
Deprecated, use
azure.cosmosdb.request.body.sizeinstead. 'db.cosmosdb.request_content_length'- DB_COSMOSDB_STATUS_CODE =
Deprecated.
Use
db.response.status_codeinstead.Note:Stability Level: development
Deprecated, use
db.response.status_codeinstead. 'db.cosmosdb.status_code'- DB_COSMOSDB_SUB_STATUS_CODE =
Deprecated.
Replaced by
azure.cosmosdb.response.sub_status_code.Note:Stability Level: development
Deprecated, use
azure.cosmosdb.response.sub_status_codeinstead. 'db.cosmosdb.sub_status_code'- DB_ELASTICSEARCH_CLUSTER_NAME =
Deprecated.
Replaced by
db.namespace.Note:Stability Level: development
Deprecated, use
db.namespaceinstead. 'db.elasticsearch.cluster.name'- DB_ELASTICSEARCH_NODE_NAME =
Deprecated.
Replaced by
elasticsearch.node.name.Note:Stability Level: development
Deprecated, use
elasticsearch.node.nameinstead. 'db.elasticsearch.node.name'- DB_ELASTICSEARCH_PATH_PARTS_LAMBDA =
Deprecated.
Replaced by
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.parameterinstead. ->(key) { "db.elasticsearch.path_parts.#{key}" }
- DB_INSTANCE_ID =
Deprecated.
Removed, no general replacement at this time. For Elasticsearch, use
db.elasticsearch.node.nameinstead.Note:Stability Level: development
Deprecated, no general replacement at this time. For Elasticsearch, use
db.elasticsearch.node.nameinstead. 'db.instance.id'- DB_JDBC_DRIVER_CLASSNAME =
Deprecated.
Removed, no replacement at this time.
Note:Stability Level: development
Removed, no replacement at this time.
'db.jdbc.driver_classname'- DB_MONGODB_COLLECTION =
Deprecated.
Replaced by
db.collection.name.Note:Stability Level: development
Deprecated, use
db.collection.nameinstead. 'db.mongodb.collection'- DB_MSSQL_INSTANCE_NAME =
Deprecated.
Removed, no replacement at this time.
Note:Stability Level: development
Deprecated, SQL Server instance is now populated as a part of
db.namespaceattribute. 'db.mssql.instance_name'- DB_NAME =
Deprecated.
Replaced by
db.namespace.Note:Stability Level: development
Deprecated, use
db.namespaceinstead. '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.namespacemeans 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.Note:Stability Level: development
Deprecated, use
db.operation.nameinstead. '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 database operations included in a batch operation.
Except for empty batch requests described below, a batch operation contains two or more database operations explicitly submitted as separate operations in a single client call, protocol message, or database command.
Requests to batch APIs that contain only one operation SHOULD be modeled as single operations, not as batch operations.
A database call is not a batch operation solely because one operation accepts multiple operands, such as keys, rows, documents, points, or other data elements, including Redis
MGETwith multiple keys.In batch APIs that execute the same parameterized operation with parameter sets, each parameter set represents one database operation for determining whether the request is a batch operation. Requests with only one parameter set SHOULD be modeled as single operations, not as batch operations.
db.operation.batch.sizeSHOULD be set to the number of operations in the batch. It SHOULD NOT be set for non-batch operations.A request to execute a batch operation with no operations SHOULD also be treated as a batch operation, and
db.operation.batch.sizeSHOULD be set to0. '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.nameSHOULD beBATCHor 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_rowsattribute.db.query.textparameters 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.It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
db.query.parameter.<key>SHOULD NOT be captured on batch operations.Examples:
- For a query
SELECT * FROM users where username = %swith the parameter"jdoe", the attributedb.query.parameter.0SHOULD be set to"jdoe". - For a query
"SELECT * FROM users WHERE username = %(userName)s;with parameteruserName = "jdoe", the attributedb.query.parameter.userNameSHOULD 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.
For batch operations, if the individual operations are known to have the same query summary then that query summary SHOULD be used prepended by
BATCH, otherwisedb.query.summarySHOULD beBATCHor some other database system specific term if more applicable. '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.
Uncategorized.
Note:Stability Level: development
Deprecated, use
db.namespaceinstead. '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_codemeans 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.Note:Stability Level: development
Deprecated, use
db.collection.nameinstead. 'db.sql.table'- DB_STATEMENT =
Deprecated.
Replaced by
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.Note:Stability Level: development
Deprecated, use
db.system.nameinstead. '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.nameis set topostgresqlbased on the instrumentation's best knowledge. 'db.system.name'- DB_USER =
Deprecated.
Removed, no replacement at this time.
Note:Stability Level: development
Deprecated, no replacement at this time.
'db.user'