Databases
as of v1.44.0Client calls to SQL and NoSQL stores: the query, the operation, the collection, and the connection pool behind them.
db 48cassandra 6oracle 5elasticsearch 1pool 1
- attributes
- 61
- metrics
- 22
- signals
- 14
- stable
- 9
- deprecated
- 35
Signals
What this domain emits, and the attributes each one carries, most strongly required first. An attribute marked * is required on that signal; * is conditionally required.
Spans 13
- db.cassandra.clientclientDevelopmentSpans representing calls to a Cassandra database adhere to the general Semantic Conventions for Database Client Spans.
db.collection.name*db.namespace*db.operation.name*db.response.status_code*error.type*server.port*cassandra.consistency.levelcassandra.coordinator.dccassandra.coordinator.idcassandra.page.sizecassandra.query.idempotentcassandra.speculative_execution.count+8 more
- db.clientclientStableThis span describes database client call.
db.system.name*db.collection.name*db.namespace*db.operation.name*db.response.status_code*error.type*server.port*db.operation.batch.sizedb.query.summarydb.query.textdb.response.returned_rowsdb.stored_procedure.name+4 more
- db.couchdb.clientclientDevelopmentSpans representing calls to CouchDB adhere to the general Semantic Conventions for Database Client Spans.
db.namespace*db.operation.name*db.response.status_code*error.type*server.port*db.operation.batch.sizeserver.address
- db.elasticsearch.clientclientDevelopmentSpans representing calls to Elasticsearch adhere to the general Semantic Conventions for Database Client Spans.
db.operation.name*http.request.method*url.full*db.operation.parameter*db.response.status_code*error.type*server.port*db.collection.namedb.namespacedb.operation.batch.sizedb.query.textelasticsearch.node.name+1 more
- db.hbase.clientclientDevelopmentSpans representing calls to an HBase database adhere to the general Semantic Conventions for Database Client Spans.
db.operation.name*db.collection.name*db.namespace*db.response.status_code*error.type*server.port*db.operation.batch.sizeserver.address
- db.mariadb.clientclientStableSpans representing calls to MariaDB adhere to the general Semantic Conventions for Database Client Spans.
db.namespace*db.response.status_code*error.type*server.port*db.collection.namedb.operation.batch.sizedb.operation.namedb.query.summarydb.query.textdb.response.returned_rowsdb.stored_procedure.nameserver.address+1 more
- db.mongodb.clientclientDevelopmentSpans representing calls to MongoDB adhere to the general Semantic Conventions for Database Client Spans.
db.collection.name*db.operation.name*db.namespace*db.response.status_code*error.type*server.port*db.operation.batch.sizeserver.address
- db.mysql.clientclientStableSpans representing calls to a MySQL Server adhere to the general Semantic Conventions for Database Client Spans.
db.namespace*db.response.status_code*error.type*server.port*db.collection.namedb.operation.batch.sizedb.operation.namedb.query.summarydb.query.textdb.response.returned_rowsdb.stored_procedure.nameserver.address+1 more
- db.oracledb.clientclientRelease candidateSpans representing calls to a Oracle SQL Database adhere to the general Semantic Conventions for Database Client Spans.
db.namespace*db.response.status_code*error.type*server.port*db.collection.namedb.operation.batch.sizedb.operation.namedb.query.summarydb.query.textdb.response.returned_rowsdb.stored_procedure.nameoracle.db.domain+6 more
- db.postgresql.clientclientStableSpans representing calls to a PostgreSQL database adhere to the general Semantic Conventions for Database Client Spans.
db.namespace*db.response.status_code*error.type*server.port*db.collection.namedb.operation.batch.sizedb.operation.namedb.query.summarydb.query.textdb.response.returned_rowsdb.stored_procedure.nameserver.address+1 more
- db.redis.clientclientDevelopmentSpans representing calls to Redis adhere to the general Semantic Conventions for Database Client Spans.
db.operation.name*db.namespace*db.response.status_code*error.type*server.port*db.operation.batch.sizedb.query.textdb.stored_procedure.namenetwork.peer.addressnetwork.peer.portserver.address
- db.sql_server.clientclientStableSpans representing calls to Microsoft SQL Server adhere to the general Semantic Conventions for Database Client Spans.
db.namespace*db.response.status_code*error.type*server.port*db.collection.namedb.operation.batch.sizedb.operation.namedb.query.summarydb.query.textdb.response.returned_rowsdb.stored_procedure.nameserver.address+1 more
- db.sql.clientclientStableThe SQL databases Semantic Conventions describes how common Database Semantic Conventions apply to SQL databases.
db.namespace*db.response.status_code*error.type*server.port*db.collection.namedb.operation.batch.sizedb.operation.namedb.query.summarydb.query.textdb.response.returned_rowsdb.stored_procedure.nameserver.address+1 more
Events 1
- db.client.operation.exceptionDevelopmentThis event represents an exception that occurred during a database client operation, such as connection failures, query
Metrics 22
- db.client.connection.countDevelopmentupdowncounter · {connection}The number of connections that are currently in state described by the state attribute.
- db.client.connection.create_timeDevelopmenthistogram · sThe time it took to create a new connection.
- db.client.connection.idle.maxDevelopmentupdowncounter · {connection}The maximum number of idle open connections allowed.
- db.client.connection.idle.minDevelopmentupdowncounter · {connection}The minimum number of idle open connections allowed.
- db.client.connection.maxDevelopmentupdowncounter · {connection}The maximum number of open connections allowed.
- db.client.connection.pending_requestsDevelopmentupdowncounter · {request}The number of current pending requests for an open connection.
- db.client.connection.timeoutsDevelopmentcounter · {timeout}The number of connection timeouts that have occurred trying to obtain a connection from the pool.
- db.client.connection.use_timeDevelopmenthistogram · sThe time between borrowing a connection and returning it to the pool.
- db.client.connection.wait_timeDevelopmenthistogram · sThe time it took to obtain an open connection from the pool.
- db.client.connections.create_timeDeprecatedhistogram · msDeprecated, use db.client.connection.create_time instead. Note: the unit also changed from ms to s.
- db.client.connections.idle.maxDeprecatedupdowncounter · {connection}Deprecated, use db.client.connection.idle.max instead.
- db.client.connections.idle.minDeprecatedupdowncounter · {connection}Deprecated, use db.client.connection.idle.min instead.
- db.client.connections.maxDeprecatedupdowncounter · {connection}Deprecated, use db.client.connection.max instead.
- db.client.connections.pending_requestsDeprecatedupdowncounter · {request}Deprecated, use db.client.connection.pending_requests instead.
- db.client.connections.timeoutsDeprecatedcounter · {timeout}Deprecated, use db.client.connection.timeouts instead.
- db.client.connections.usageDeprecatedupdowncounter · {connection}Deprecated, use db.client.connection.count instead.
- db.client.connections.use_timeDeprecatedhistogram · msDeprecated, use db.client.connection.use_time instead. Note: the unit also changed from ms to s.
- db.client.connections.wait_timeDeprecatedhistogram · msDeprecated, use db.client.connection.wait_time instead. Note: the unit also changed from ms to s.
- db.client.cosmosdb.active_instance.countDeprecatedupdowncounter · {instance}Deprecated, use azure.cosmosdb.client.active_instance.count instead.
- db.client.cosmosdb.operation.request_chargeDeprecatedhistogram · {request_unit}Deprecated, use azure.cosmosdb.client.operation.request_charge instead.
- db.client.operation.durationStablehistogram · sDuration of database client operations.
- db.client.response.returned_rowsDevelopmenthistogram · {row}The actual number of records returned by the database operation.
Specification
- Spansare bound by the trace specification — 289 requirements across 7 documents, 166 of them MUST or SHALL.
- Metricsare bound by the metrics specification — 548 requirements across 8 documents, 279 of them MUST or SHALL.
- Eventsare bound by the logs specification — 162 requirements across 5 documents, 83 of them MUST or SHALL.
The specification prose never names this domain. That is not an omission: the specification defines signals, not subject matter — what binds db telemetry is the general rules above, and the conventions themselves carry the rest.
On the wire, this lands in trace/v1/trace, metrics/v1/metrics, logs/v1/logs. Field-by-field definitions are under OTLP.
Attributes 61
db48 attributes
- db.cassandra.consistency_level
- db.cassandra.coordinator.dc
- db.cassandra.coordinator.id
- db.cassandra.idempotence
- db.cassandra.page_size
- db.cassandra.speculative_execution_countDeprecated→ cassandra.speculative_execution.countDeprecated, use cassandra.speculative_execution.count instead.
- db.cassandra.table
- db.client.connection.pool.nameDevelopmentThe name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation
- db.client.connection.stateDevelopmentThe state of a connection in the pool
- db.client.connections.pool.name
- db.client.connections.state
- db.collection.nameStableThe name of a collection (table, container) within the database.
- db.connection_stringDeprecatedDeprecated, use server.address, server.port attributes instead.
- db.cosmosdb.client_id
- db.cosmosdb.connection_mode
- db.cosmosdb.consistency_level
- db.cosmosdb.container
- db.cosmosdb.operation_typeDeprecatedDeprecated, no replacement at this time.
- db.cosmosdb.regions_contactedDeprecated→ azure.cosmosdb.operation.contacted_regionsDeprecated, use azure.cosmosdb.operation.contacted_regions instead.
- db.cosmosdb.request_chargeDeprecated→ azure.cosmosdb.operation.request_chargeDeprecated, use azure.cosmosdb.operation.request_charge instead.
- db.cosmosdb.request_content_lengthDeprecated→ azure.cosmosdb.request.body.sizeDeprecated, use azure.cosmosdb.request.body.size instead.
- db.cosmosdb.status_codeDeprecatedDeprecated, use db.response.status_code instead.
- db.cosmosdb.sub_status_codeDeprecated→ azure.cosmosdb.response.sub_status_codeDeprecated, use azure.cosmosdb.response.sub_status_code instead.
- db.elasticsearch.cluster.name
- db.elasticsearch.node.name
- db.elasticsearch.path_parts
- db.instance.idDeprecatedDeprecated, no general replacement at this time. For Elasticsearch, use db.elasticsearch.node.name instead.
- db.jdbc.driver_classnameDeprecatedRemoved, no replacement at this time.
- db.mongodb.collection
- db.mssql.instance_nameDeprecatedDeprecated, SQL Server instance is now populated as a part of db.namespace attribute.
- db.name
- db.namespaceStableThe name of the database, fully qualified within the server address and port.
- db.operation
- db.operation.batch.sizeStableThe number of database operations included in a batch operation.
- db.operation.nameStableThe name of the operation or command being executed.
- db.operation.parameterDevelopmentA database operation parameter, with <key> being the parameter name, and the attribute value being a string representation of the parameter value.
- db.query.parameterDevelopmentA database query parameter, with <key> being the parameter name, and the attribute value being a string representation of the parameter value.
- db.query.summaryStableLow cardinality summary of a database query.
- db.query.textStableThe database query being executed.
- db.redis.database_indexDeprecatedDeprecated, use db.namespace instead.
- db.response.returned_rowsDevelopmentNumber of rows returned by the operation.
- db.response.status_codeStableDatabase response status code.
- db.sql.tableDeprecatedDeprecated, use db.collection.name instead.
- db.statement
- db.stored_procedure.nameStableThe name of a stored procedure within the database.
- db.system
- db.system.nameStableThe database management system (DBMS) product as identified by the client instrumentation.
- db.userDeprecatedDeprecated, no replacement at this time.
cassandra6 attributes
- cassandra.consistency.levelDevelopmentThe consistency level of the query. Based on consistency values from CQL.
- cassandra.coordinator.dcDevelopmentThe data center of the coordinating node for a query.
- cassandra.coordinator.idDevelopmentThe ID of the coordinating node for a query.
- cassandra.page.sizeDevelopmentThe fetch size used for paging, i.e. how many rows will be returned at once.
- cassandra.query.idempotentDevelopmentWhether or not the query is idempotent.
- cassandra.speculative_execution.countDevelopmentThe number of times a query was speculatively executed. Not set or 0 if the query was not executed speculatively.
oracle5 attributes
- oracle.db.domainRelease candidateThe database domain associated with the connection.
- oracle.db.instance.nameRelease candidateThe instance name associated with the connection in an Oracle Real Application Clusters environment.
- oracle.db.nameRelease candidateThe database name associated with the connection.
- oracle.db.pdbRelease candidateThe pluggable database (PDB) name associated with the connection.
- oracle.db.serviceRelease candidateThe service name currently associated with the database connection.
elasticsearch1 attributes
- elasticsearch.node.nameDevelopmentRepresents the human-readable identifier of the node/instance to which a request was routed.
pool1 attributes
Recent changes
Breaking and notable changes to this domain across the last 6 semantic-conventions releases.
- deprecatedattributedb.redis.database_indexReplaced by
db.namespace(string). - stabilityattributeoracle.db.domainPromoted to release_candidate.
- stabilityattributeoracle.db.instance.namePromoted to release_candidate.
- stabilityattributeoracle.db.namePromoted to release_candidate.
- stabilityattributeoracle.db.pdbPromoted to release_candidate.
- stabilityattributeoracle.db.servicePromoted to release_candidate.
Topics are this site's grouping of upstream namespaces, not a structure the OpenTelemetry project publishes. JSON · All domains