semconv.com

db.operation.batch.size

Stableintas of v1.44.0

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 MGET with 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.size SHOULD 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.size SHOULD be set to 0.

Examples

Used by

spans (14)

  • span.azure.cosmosdb.client
  • span.db.cassandra.client
  • span.db.client
  • span.db.couchdb.client
  • span.db.elasticsearch.client
  • span.db.hbase.client
  • span.db.mariadb.client
  • span.db.mongodb.client
  • span.db.mysql.client
  • span.db.oracledb.client
  • span.db.postgresql.client
  • span.db.redis.client
  • span.db.sql_server.client
  • span.db.sql.client

* required on that signal.

History

  1. v1.33.0stability

    Promoted to stable.

  2. v1.30.0

    Already present at v1.30.0, the oldest release tracked here (release_candidate).

Definition sourceRegistry docsJSON