OpenTelemetry PHP

DbIncubatingAttributes

Semantic attributes and corresponding values for db.

Tags
see
https://opentelemetry.io/docs/specs/semconv/registry/attributes/db/

May contain @experimental Semantic Conventions which may change or be removed in the future.

Table of Contents

Constants

DB_CLIENT_CONNECTION_POOL_NAME  = 'db.client.connection.pool.name'
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`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.
DB_CLIENT_CONNECTION_STATE  = 'db.client.connection.state'
The state of a connection in the pool
DB_CLIENT_CONNECTION_STATE_VALUE_IDLE  = 'idle'
none
DB_CLIENT_CONNECTION_STATE_VALUE_USED  = 'used'
none
DB_COLLECTION_NAME  = 'db.collection.name'
The name of a collection (table, container) within the database.
DB_NAMESPACE  = 'db.namespace'
The name of the database, fully qualified within the server address and port.
DB_OPERATION_BATCH_SIZE  = 'db.operation.batch.size'
The number of queries included in a batch operation.
DB_OPERATION_NAME  = 'db.operation.name'
The name of the operation or command being executed.
DB_OPERATION_PARAMETER  = 'db.operation.parameter'
A database operation parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.
DB_QUERY_PARAMETER  = 'db.query.parameter'
A database query parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.
DB_QUERY_SUMMARY  = 'db.query.summary'
Low cardinality summary of a database query.
DB_QUERY_TEXT  = 'db.query.text'
The database query being executed.
DB_RESPONSE_RETURNED_ROWS  = 'db.response.returned_rows'
Number of rows returned by the operation.
DB_RESPONSE_STATUS_CODE  = 'db.response.status_code'
Database response status code.
DB_STORED_PROCEDURE_NAME  = 'db.stored_procedure.name'
The name of a stored procedure within the database.
DB_SYSTEM_NAME  = 'db.system.name'
The database management system (DBMS) product as identified by the client instrumentation.
DB_SYSTEM_NAME_VALUE_ACTIAN_INGRES  = 'actian.ingres'
[Actian Ingres](https://www.actian.com/databases/ingres/)
DB_SYSTEM_NAME_VALUE_AWS_DYNAMODB  = 'aws.dynamodb'
[Amazon DynamoDB](https://aws.amazon.com/pm/dynamodb/)
DB_SYSTEM_NAME_VALUE_AWS_REDSHIFT  = 'aws.redshift'
[Amazon Redshift](https://aws.amazon.com/redshift/)
DB_SYSTEM_NAME_VALUE_AZURE_COSMOSDB  = 'azure.cosmosdb'
[Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db)
DB_SYSTEM_NAME_VALUE_CASSANDRA  = 'cassandra'
[Apache Cassandra](https://cassandra.apache.org/)
DB_SYSTEM_NAME_VALUE_CLICKHOUSE  = 'clickhouse'
[ClickHouse](https://clickhouse.com/)
DB_SYSTEM_NAME_VALUE_COCKROACHDB  = 'cockroachdb'
[CockroachDB](https://www.cockroachlabs.com/)
DB_SYSTEM_NAME_VALUE_COUCHBASE  = 'couchbase'
[Couchbase](https://www.couchbase.com/)
DB_SYSTEM_NAME_VALUE_COUCHDB  = 'couchdb'
[Apache CouchDB](https://couchdb.apache.org/)
DB_SYSTEM_NAME_VALUE_DERBY  = 'derby'
[Apache Derby](https://db.apache.org/derby/)
DB_SYSTEM_NAME_VALUE_ELASTICSEARCH  = 'elasticsearch'
[Elasticsearch](https://www.elastic.co/elasticsearch)
DB_SYSTEM_NAME_VALUE_FIREBIRDSQL  = 'firebirdsql'
[Firebird](https://www.firebirdsql.org/)
DB_SYSTEM_NAME_VALUE_GCP_SPANNER  = 'gcp.spanner'
[Google Cloud Spanner](https://cloud.google.com/spanner)
DB_SYSTEM_NAME_VALUE_GEODE  = 'geode'
[Apache Geode](https://geode.apache.org/)
DB_SYSTEM_NAME_VALUE_H2DATABASE  = 'h2database'
[H2 Database](https://h2database.com/)
DB_SYSTEM_NAME_VALUE_HBASE  = 'hbase'
[Apache HBase](https://hbase.apache.org/)
DB_SYSTEM_NAME_VALUE_HIVE  = 'hive'
[Apache Hive](https://hive.apache.org/)
DB_SYSTEM_NAME_VALUE_HSQLDB  = 'hsqldb'
[HyperSQL Database](https://hsqldb.org/)
DB_SYSTEM_NAME_VALUE_IBM_DB2  = 'ibm.db2'
[IBM Db2](https://www.ibm.com/db2)
DB_SYSTEM_NAME_VALUE_IBM_INFORMIX  = 'ibm.informix'
[IBM Informix](https://www.ibm.com/products/informix)
DB_SYSTEM_NAME_VALUE_IBM_NETEZZA  = 'ibm.netezza'
[IBM Netezza](https://www.ibm.com/products/netezza)
DB_SYSTEM_NAME_VALUE_INFLUXDB  = 'influxdb'
[InfluxDB](https://www.influxdata.com/)
DB_SYSTEM_NAME_VALUE_INSTANTDB  = 'instantdb'
[Instant](https://www.instantdb.com/)
DB_SYSTEM_NAME_VALUE_INTERSYSTEMS_CACHE  = 'intersystems.cache'
[InterSystems Caché](https://www.intersystems.com/products/cache/)
DB_SYSTEM_NAME_VALUE_MARIADB  = 'mariadb'
[MariaDB](https://mariadb.org/)
DB_SYSTEM_NAME_VALUE_MEMCACHED  = 'memcached'
[Memcached](https://memcached.org/)
DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER  = 'microsoft.sql_server'
[Microsoft SQL Server](https://www.microsoft.com/sql-server)
DB_SYSTEM_NAME_VALUE_MONGODB  = 'mongodb'
[MongoDB](https://www.mongodb.com/)
DB_SYSTEM_NAME_VALUE_MYSQL  = 'mysql'
[MySQL](https://www.mysql.com/)
DB_SYSTEM_NAME_VALUE_NEO4J  = 'neo4j'
[Neo4j](https://neo4j.com/)
DB_SYSTEM_NAME_VALUE_OPENSEARCH  = 'opensearch'
[OpenSearch](https://opensearch.org/)
DB_SYSTEM_NAME_VALUE_ORACLE_DB  = 'oracle.db'
[Oracle Database](https://www.oracle.com/database/)
DB_SYSTEM_NAME_VALUE_OTHER_SQL  = 'other_sql'
Some other SQL database. Fallback only.
DB_SYSTEM_NAME_VALUE_POSTGRESQL  = 'postgresql'
[PostgreSQL](https://www.postgresql.org/)
DB_SYSTEM_NAME_VALUE_REDIS  = 'redis'
[Redis](https://redis.io/)
DB_SYSTEM_NAME_VALUE_SAP_HANA  = 'sap.hana'
[SAP HANA](https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html)
DB_SYSTEM_NAME_VALUE_SAP_MAXDB  = 'sap.maxdb'
[SAP MaxDB](https://maxdb.sap.com/)
DB_SYSTEM_NAME_VALUE_SOFTWAREAG_ADABAS  = 'softwareag.adabas'
[Adabas (Adaptable Database System)](https://documentation.softwareag.com/?pf=adabas)
DB_SYSTEM_NAME_VALUE_SQLITE  = 'sqlite'
[SQLite](https://www.sqlite.org/)
DB_SYSTEM_NAME_VALUE_TERADATA  = 'teradata'
[Teradata](https://www.teradata.com/)
DB_SYSTEM_NAME_VALUE_TRINO  = 'trino'
[Trino](https://trino.io/)

Constants

DB_CLIENT_CONNECTION_POOL_NAME

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`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

public mixed DB_CLIENT_CONNECTION_POOL_NAME = 'db.client.connection.pool.name'
Tags
experimental

DB_CLIENT_CONNECTION_STATE

The state of a connection in the pool

public mixed DB_CLIENT_CONNECTION_STATE = 'db.client.connection.state'
Tags
experimental

DB_CLIENT_CONNECTION_STATE_VALUE_IDLE

none

public mixed DB_CLIENT_CONNECTION_STATE_VALUE_IDLE = 'idle'
Tags
experimental

DB_CLIENT_CONNECTION_STATE_VALUE_USED

none

public mixed DB_CLIENT_CONNECTION_STATE_VALUE_USED = 'used'
Tags
experimental

DB_COLLECTION_NAME

The name of a collection (table, container) within the database.

public mixed DB_COLLECTION_NAME = 'db.collection.name'

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.

Tags
stable

DB_NAMESPACE

The name of the database, fully qualified within the server address and port.

public mixed DB_NAMESPACE = 'db.namespace'

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 what db.namespace means 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.

Tags
stable

DB_OPERATION_BATCH_SIZE

The number of queries included in a batch operation.

public mixed DB_OPERATION_BATCH_SIZE = 'db.operation.batch.size'

Operations are only considered batches when they contain two or more operations, and so db.operation.batch.size SHOULD never be 1.

Tags
stable

DB_OPERATION_NAME

The name of the operation or command being executed.

public mixed DB_OPERATION_NAME = 'db.operation.name'

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 , otherwise db.operation.name SHOULD be BATCH or some other database system specific term if more applicable.

Tags
stable

DB_OPERATION_PARAMETER

A database operation parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.

public mixed DB_OPERATION_PARAMETER = 'db.operation.parameter'

For example, a client-side maximum number of rows to read from the database MAY be recorded as the db.operation.parameter.max_rows attribute.

db.query.text parameters SHOULD be captured using db.query.parameter.<key> instead of db.operation.parameter.<key>.

Tags
experimental

DB_QUERY_PARAMETER

A database query parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.

public mixed DB_QUERY_PARAMETER = 'db.query.parameter'

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 in db.query.text.

db.query.parameter.<key> SHOULD NOT be captured on batch operations.

Examples:

  • For a query SELECT * FROM users where username = %s with the parameter "jdoe", the attribute db.query.parameter.0 SHOULD be set to "jdoe".
  • For a query "SELECT * FROM users WHERE username = %(username)s; with parameter username = "jdoe", the attribute db.query.parameter.username SHOULD be set to "jdoe".
Tags
experimental

DB_QUERY_SUMMARY

Low cardinality summary of a database query.

public mixed DB_QUERY_SUMMARY = 'db.query.summary'

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.

Tags
stable

DB_QUERY_TEXT

The database query being executed.

public mixed DB_QUERY_TEXT = 'db.query.text'

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.

Tags
stable

DB_RESPONSE_RETURNED_ROWS

Number of rows returned by the operation.

public mixed DB_RESPONSE_RETURNED_ROWS = 'db.response.returned_rows'
Tags
experimental

DB_RESPONSE_STATUS_CODE

Database response status code.

public mixed DB_RESPONSE_STATUS_CODE = 'db.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_code means in the context of that system.

Tags
stable

DB_STORED_PROCEDURE_NAME

The name of a stored procedure within the database.

public mixed DB_STORED_PROCEDURE_NAME = 'db.stored_procedure.name'

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.

Tags
stable

DB_SYSTEM_NAME

The database management system (DBMS) product as identified by the client instrumentation.

public mixed DB_SYSTEM_NAME = 'db.system.name'

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.name is set to postgresql based on the instrumentation's best knowledge.

Tags
stable

DB_SYSTEM_NAME_VALUE_ACTIAN_INGRES

[Actian Ingres](https://www.actian.com/databases/ingres/)

public mixed DB_SYSTEM_NAME_VALUE_ACTIAN_INGRES = 'actian.ingres'
Tags
stable

DB_SYSTEM_NAME_VALUE_AWS_DYNAMODB

[Amazon DynamoDB](https://aws.amazon.com/pm/dynamodb/)

public mixed DB_SYSTEM_NAME_VALUE_AWS_DYNAMODB = 'aws.dynamodb'
Tags
stable

DB_SYSTEM_NAME_VALUE_AWS_REDSHIFT

[Amazon Redshift](https://aws.amazon.com/redshift/)

public mixed DB_SYSTEM_NAME_VALUE_AWS_REDSHIFT = 'aws.redshift'
Tags
stable

DB_SYSTEM_NAME_VALUE_AZURE_COSMOSDB

[Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db)

public mixed DB_SYSTEM_NAME_VALUE_AZURE_COSMOSDB = 'azure.cosmosdb'
Tags
stable

DB_SYSTEM_NAME_VALUE_CASSANDRA

[Apache Cassandra](https://cassandra.apache.org/)

public mixed DB_SYSTEM_NAME_VALUE_CASSANDRA = 'cassandra'
Tags
stable

DB_SYSTEM_NAME_VALUE_CLICKHOUSE

[ClickHouse](https://clickhouse.com/)

public mixed DB_SYSTEM_NAME_VALUE_CLICKHOUSE = 'clickhouse'
Tags
stable

DB_SYSTEM_NAME_VALUE_COCKROACHDB

[CockroachDB](https://www.cockroachlabs.com/)

public mixed DB_SYSTEM_NAME_VALUE_COCKROACHDB = 'cockroachdb'
Tags
stable

DB_SYSTEM_NAME_VALUE_COUCHBASE

[Couchbase](https://www.couchbase.com/)

public mixed DB_SYSTEM_NAME_VALUE_COUCHBASE = 'couchbase'
Tags
stable

DB_SYSTEM_NAME_VALUE_COUCHDB

[Apache CouchDB](https://couchdb.apache.org/)

public mixed DB_SYSTEM_NAME_VALUE_COUCHDB = 'couchdb'
Tags
stable

DB_SYSTEM_NAME_VALUE_DERBY

[Apache Derby](https://db.apache.org/derby/)

public mixed DB_SYSTEM_NAME_VALUE_DERBY = 'derby'
Tags
stable

DB_SYSTEM_NAME_VALUE_ELASTICSEARCH

[Elasticsearch](https://www.elastic.co/elasticsearch)

public mixed DB_SYSTEM_NAME_VALUE_ELASTICSEARCH = 'elasticsearch'
Tags
stable

DB_SYSTEM_NAME_VALUE_FIREBIRDSQL

[Firebird](https://www.firebirdsql.org/)

public mixed DB_SYSTEM_NAME_VALUE_FIREBIRDSQL = 'firebirdsql'
Tags
stable

DB_SYSTEM_NAME_VALUE_GCP_SPANNER

[Google Cloud Spanner](https://cloud.google.com/spanner)

public mixed DB_SYSTEM_NAME_VALUE_GCP_SPANNER = 'gcp.spanner'
Tags
stable

DB_SYSTEM_NAME_VALUE_GEODE

[Apache Geode](https://geode.apache.org/)

public mixed DB_SYSTEM_NAME_VALUE_GEODE = 'geode'
Tags
stable

DB_SYSTEM_NAME_VALUE_H2DATABASE

[H2 Database](https://h2database.com/)

public mixed DB_SYSTEM_NAME_VALUE_H2DATABASE = 'h2database'
Tags
stable

DB_SYSTEM_NAME_VALUE_HBASE

[Apache HBase](https://hbase.apache.org/)

public mixed DB_SYSTEM_NAME_VALUE_HBASE = 'hbase'
Tags
stable

DB_SYSTEM_NAME_VALUE_HIVE

[Apache Hive](https://hive.apache.org/)

public mixed DB_SYSTEM_NAME_VALUE_HIVE = 'hive'
Tags
stable

DB_SYSTEM_NAME_VALUE_HSQLDB

[HyperSQL Database](https://hsqldb.org/)

public mixed DB_SYSTEM_NAME_VALUE_HSQLDB = 'hsqldb'
Tags
stable

DB_SYSTEM_NAME_VALUE_IBM_DB2

[IBM Db2](https://www.ibm.com/db2)

public mixed DB_SYSTEM_NAME_VALUE_IBM_DB2 = 'ibm.db2'
Tags
stable

DB_SYSTEM_NAME_VALUE_IBM_INFORMIX

[IBM Informix](https://www.ibm.com/products/informix)

public mixed DB_SYSTEM_NAME_VALUE_IBM_INFORMIX = 'ibm.informix'
Tags
stable

DB_SYSTEM_NAME_VALUE_IBM_NETEZZA

[IBM Netezza](https://www.ibm.com/products/netezza)

public mixed DB_SYSTEM_NAME_VALUE_IBM_NETEZZA = 'ibm.netezza'
Tags
stable

DB_SYSTEM_NAME_VALUE_INFLUXDB

[InfluxDB](https://www.influxdata.com/)

public mixed DB_SYSTEM_NAME_VALUE_INFLUXDB = 'influxdb'
Tags
stable

DB_SYSTEM_NAME_VALUE_INSTANTDB

[Instant](https://www.instantdb.com/)

public mixed DB_SYSTEM_NAME_VALUE_INSTANTDB = 'instantdb'
Tags
stable

DB_SYSTEM_NAME_VALUE_INTERSYSTEMS_CACHE

[InterSystems Caché](https://www.intersystems.com/products/cache/)

public mixed DB_SYSTEM_NAME_VALUE_INTERSYSTEMS_CACHE = 'intersystems.cache'
Tags
stable

DB_SYSTEM_NAME_VALUE_MARIADB

[MariaDB](https://mariadb.org/)

public mixed DB_SYSTEM_NAME_VALUE_MARIADB = 'mariadb'
Tags
stable

DB_SYSTEM_NAME_VALUE_MEMCACHED

[Memcached](https://memcached.org/)

public mixed DB_SYSTEM_NAME_VALUE_MEMCACHED = 'memcached'
Tags
stable

DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER

[Microsoft SQL Server](https://www.microsoft.com/sql-server)

public mixed DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER = 'microsoft.sql_server'
Tags
stable

DB_SYSTEM_NAME_VALUE_MONGODB

[MongoDB](https://www.mongodb.com/)

public mixed DB_SYSTEM_NAME_VALUE_MONGODB = 'mongodb'
Tags
stable

DB_SYSTEM_NAME_VALUE_MYSQL

[MySQL](https://www.mysql.com/)

public mixed DB_SYSTEM_NAME_VALUE_MYSQL = 'mysql'
Tags
stable

DB_SYSTEM_NAME_VALUE_NEO4J

[Neo4j](https://neo4j.com/)

public mixed DB_SYSTEM_NAME_VALUE_NEO4J = 'neo4j'
Tags
stable

DB_SYSTEM_NAME_VALUE_OPENSEARCH

[OpenSearch](https://opensearch.org/)

public mixed DB_SYSTEM_NAME_VALUE_OPENSEARCH = 'opensearch'
Tags
stable

DB_SYSTEM_NAME_VALUE_ORACLE_DB

[Oracle Database](https://www.oracle.com/database/)

public mixed DB_SYSTEM_NAME_VALUE_ORACLE_DB = 'oracle.db'
Tags
stable

DB_SYSTEM_NAME_VALUE_OTHER_SQL

Some other SQL database. Fallback only.

public mixed DB_SYSTEM_NAME_VALUE_OTHER_SQL = 'other_sql'
Tags
stable

DB_SYSTEM_NAME_VALUE_POSTGRESQL

[PostgreSQL](https://www.postgresql.org/)

public mixed DB_SYSTEM_NAME_VALUE_POSTGRESQL = 'postgresql'
Tags
stable

DB_SYSTEM_NAME_VALUE_REDIS

[Redis](https://redis.io/)

public mixed DB_SYSTEM_NAME_VALUE_REDIS = 'redis'
Tags
stable

DB_SYSTEM_NAME_VALUE_SAP_HANA

[SAP HANA](https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html)

public mixed DB_SYSTEM_NAME_VALUE_SAP_HANA = 'sap.hana'
Tags
stable

DB_SYSTEM_NAME_VALUE_SAP_MAXDB

[SAP MaxDB](https://maxdb.sap.com/)

public mixed DB_SYSTEM_NAME_VALUE_SAP_MAXDB = 'sap.maxdb'
Tags
stable

DB_SYSTEM_NAME_VALUE_SOFTWAREAG_ADABAS

[Adabas (Adaptable Database System)](https://documentation.softwareag.com/?pf=adabas)

public mixed DB_SYSTEM_NAME_VALUE_SOFTWAREAG_ADABAS = 'softwareag.adabas'
Tags
stable

DB_SYSTEM_NAME_VALUE_SQLITE

[SQLite](https://www.sqlite.org/)

public mixed DB_SYSTEM_NAME_VALUE_SQLITE = 'sqlite'
Tags
stable

DB_SYSTEM_NAME_VALUE_TERADATA

[Teradata](https://www.teradata.com/)

public mixed DB_SYSTEM_NAME_VALUE_TERADATA = 'teradata'
Tags
stable

DB_SYSTEM_NAME_VALUE_TRINO

[Trino](https://trino.io/)

public mixed DB_SYSTEM_NAME_VALUE_TRINO = 'trino'
Tags
stable

        
On this page

Search results