Skip to content
semconv.com
↑↓ move↵ openUse with your agent →

Databases

as of v1.45.0

Client 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

Events 1

Metrics 23

  • db.client.connection.count
    Developmentupdowncounter · {connection}The number of connections that are currently in state described by the state attribute.
  • db.client.connection.create_time
    Developmenthistogram · sThe time it took to create a new connection.
  • db.client.connection.idle.max
    Developmentupdowncounter · {connection}The maximum number of idle open connections allowed.
  • db.client.connection.idle.min
    Developmentupdowncounter · {connection}The minimum number of idle open connections allowed.
  • db.client.connection.limit
    Developmentupdowncounter · {connection}The maximum number of open connections allowed.
  • db.client.connection.max
    Deprecatedupdowncounter · {connection}Deprecated, use db.client.connection.limit instead.
  • db.client.connection.pending_requests
    Developmentupdowncounter · {request}The number of current pending requests for an open connection.
  • db.client.connection.timeouts
    Developmentcounter · {timeout}The number of connection timeouts that have occurred trying to obtain a connection from the pool.
  • db.client.connection.use_time
    Developmenthistogram · sThe time between borrowing a connection and returning it to the pool.
  • db.client.connection.wait_time
    Developmenthistogram · sThe time it took to obtain an open connection from the pool.
  • db.client.connections.create_time
    Deprecatedhistogram · msDeprecated, use db.client.connection.create_time instead. Note: the unit also changed from ms to s.
  • db.client.connections.idle.max
    Deprecatedupdowncounter · {connection}Deprecated, use db.client.connection.idle.max instead.
  • db.client.connections.idle.min
    Deprecatedupdowncounter · {connection}Deprecated, use db.client.connection.idle.min instead.
  • db.client.connections.max
    Deprecatedupdowncounter · {connection}Deprecated, use db.client.connection.limit instead.
  • db.client.connections.pending_requests
    Deprecatedupdowncounter · {request}Deprecated, use db.client.connection.pending_requests instead.
  • db.client.connections.timeouts
    Deprecatedcounter · {timeout}Deprecated, use db.client.connection.timeouts instead.
  • db.client.connections.usage
    Deprecatedupdowncounter · {connection}Deprecated, use db.client.connection.count instead.
  • db.client.connections.use_time
    Deprecatedhistogram · msDeprecated, use db.client.connection.use_time instead. Note: the unit also changed from ms to s.
  • db.client.connections.wait_time
    Deprecatedhistogram · msDeprecated, use db.client.connection.wait_time instead. Note: the unit also changed from ms to s.
  • db.client.cosmosdb.active_instance.count
    Deprecatedupdowncounter · {instance}Deprecated, use azure.cosmosdb.client.active_instance.count instead.
  • db.client.cosmosdb.operation.request_charge
    Deprecatedhistogram · {request_unit}Deprecated, use azure.cosmosdb.client.operation.request_charge instead.
  • db.client.operation.duration
    Stablehistogram · sDuration of database client operations.
  • db.client.response.returned_rows
    Developmenthistogram · {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

cassandra6 attributes

oracle5 attributes

  • oracle.db.domain
    Release candidateThe database domain associated with the connection.
  • oracle.db.instance.name
    Release candidateThe instance name associated with the connection in an Oracle Real Application Clusters environment.
  • oracle.db.name
    Release candidateThe database name associated with the connection.
  • oracle.db.pdb
    Release candidateThe pluggable database (PDB) name associated with the connection.
  • oracle.db.service
    Release candidateThe service name currently associated with the database connection.

elasticsearch1 attribute

  • elasticsearch.node.name
    DevelopmentRepresents 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.client and 2 others (conditionally required).
  • Usageattributedb.namespaceNow referenced by attributes.db.client.with_query_and_collection, attributes.metrics.db.client.connection.pool and 13 others (conditionally required).
  • Usageattributedb.operation.nameNow referenced by azure.cosmosdb.client.detailed, db.client and 2 others (required).
  • Usageattributedb.response.status_codeNow referenced by azure.cosmosdb.client.detailed, db.client and 2 others (conditionally required).
  • Usageattributedb.system.nameNow referenced by attributes.db.client.with_query_and_collection, attributes.metrics.db.client.connection.pool and 10 others (conditionally required).
  • Deprecatedattributedb.redis.database_indexReplaced by db.namespace (string).
  • Stabilityattributeoracle.db.domainPromoted to release_candidate.

4 more in the full release history

Topics are this site's grouping of upstream namespaces, not a structure the OpenTelemetry project publishes. JSON · All domains