Databases
as of v1.45.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
- 23
- Signals
- 2
- 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 1
- db.clientclientStableThis span describes database client call.
db.system.name*db.response.status_code*error.type*db.collection.namedb.namespacedb.operation.batch.sizedb.operation.namedb.query.summarydb.query.textdb.stored_procedure.namenetwork.peer.addressnetwork.peer.port+4 more
Events 1
- db.client.operation.exceptionDevelopmentThis event represents an exception that occurred during a database client operation, such as connection failures, query
Metrics 23
- 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.limitDevelopmentupdowncounter · {connection}The maximum number of open connections allowed.
- db.client.connection.maxDeprecatedupdowncounter · {connection}Deprecated, use db.client.connection.limit instead.
- 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.limit 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 — 312 requirements across 8 documents, 176 of them MUST or SHALL.
- Metricsare bound by the metrics specification — 569 requirements across 8 documents, 296 of them MUST or SHALL.
- Eventsare bound by the logs specification — 163 requirements across 5 documents, 84 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. If the connection pool does not have a name, instrumentation SHOULD use db.namespace; otherwise server.address, with server.por
- 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 attribute
- elasticsearch.node.nameDevelopmentRepresents the human-readable identifier of the node/instance to which a request was routed.
pool1 attribute
Recent changes
Breaking and notable changes to this domain across the last 6 semantic-conventions releases.
- Renamedmetricdb.client.connection.maxRenamed to
db.client.connection.limit. - Renamedmetricdb.client.connections.maxRenamed to
db.client.connection.limit. - Strengthattributedb.collection.nameOn
azure.cosmosdb.client.operation.request_charge: recommended to conditionally required. - Usageattributedb.collection.nameNow referenced by
azure.cosmosdb.client.detailed,db.clientand 2 others (conditionally required). - Usageattributedb.namespaceNow referenced by
attributes.db.client.with_query_and_collection,attributes.metrics.db.client.connection.pooland 13 others (conditionally required). - Usageattributedb.operation.nameNow referenced by
azure.cosmosdb.client.detailed,db.clientand 2 others (required). - Usageattributedb.response.status_codeNow referenced by
azure.cosmosdb.client.detailed,db.clientand 2 others (conditionally required). - Usageattributedb.system.nameNow referenced by
attributes.db.client.with_query_and_collection,attributes.metrics.db.client.connection.pooland 10 others (conditionally required). - Deprecatedattributedb.redis.database_indexReplaced by
db.namespace(string). - Stabilityattributeoracle.db.domainPromoted to release_candidate.
Topics are this site's grouping of upstream namespaces, not a structure the OpenTelemetry project publishes. JSON · All domains