/* * Copyright The OpenTelemetry Authors * SPDX-License-Identifier: Apache-2.0 */ /* * DO NOT EDIT, this is an Auto-generated file from: * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2 */ #pragma once #include "opentelemetry/common/macros.h" #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE namespace semconv { namespace db { /** The name of a collection (table, container) within the database.
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 @code db.query.text @endcode, 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. */ static constexpr const char *kDbCollectionName = "db.collection.name"; /** The name of the database, fully qualified within the server address and port.
If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using @code | @endcode 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 @code db.namespace @endcode 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. */ static constexpr const char *kDbNamespace = "db.namespace"; /** The number of queries included in a batch operation.
Operations are only considered batches when they contain two or more operations, and so @code db.operation.batch.size @endcode SHOULD never be @code 1 @endcode. */ static constexpr const char *kDbOperationBatchSize = "db.operation.batch.size"; /** The name of the operation or command being executed.
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 @code db.query.text @endcode, 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 @code BATCH @endcode, otherwise @code db.operation.name @endcode SHOULD be @code BATCH @endcode or some other database system specific term if more applicable. */ static constexpr const char *kDbOperationName = "db.operation.name"; /** Low cardinality summary of a database query.
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. */ static constexpr const char *kDbQuerySummary = "db.query.summary"; /** The database query being executed.
For sanitization see Sanitization of @code db.query.text @endcode. 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 @code ; @endcode 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. */ static constexpr const char *kDbQueryText = "db.query.text"; /** Database 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 @code db.response.status_code @endcode means in the context of that system. */ static constexpr const char *kDbResponseStatusCode = "db.response.status_code"; /** The name of a stored procedure within the database.
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. */ static constexpr const char *kDbStoredProcedureName = "db.stored_procedure.name"; /** The database management system (DBMS) product as identified by the client instrumentation.
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 @code db.system.name @endcode is set to @code postgresql @endcode based on the instrumentation's best knowledge. */ static constexpr const char *kDbSystemName = "db.system.name"; namespace DbSystemNameValues { /** Some other SQL database. Fallback only. */ static constexpr const char *kOtherSql = "other_sql"; /** Adabas (Adaptable Database System) */ static constexpr const char *kSoftwareagAdabas = "softwareag.adabas"; /** Actian Ingres */ static constexpr const char *kActianIngres = "actian.ingres"; /** Amazon DynamoDB */ static constexpr const char *kAwsDynamodb = "aws.dynamodb"; /** Amazon Redshift */ static constexpr const char *kAwsRedshift = "aws.redshift"; /** Azure Cosmos DB */ static constexpr const char *kAzureCosmosdb = "azure.cosmosdb"; /** InterSystems Caché */ static constexpr const char *kIntersystemsCache = "intersystems.cache"; /** Apache Cassandra */ static constexpr const char *kCassandra = "cassandra"; /** ClickHouse */ static constexpr const char *kClickhouse = "clickhouse"; /** CockroachDB */ static constexpr const char *kCockroachdb = "cockroachdb"; /** Couchbase */ static constexpr const char *kCouchbase = "couchbase"; /** Apache CouchDB */ static constexpr const char *kCouchdb = "couchdb"; /** Apache Derby */ static constexpr const char *kDerby = "derby"; /** Elasticsearch */ static constexpr const char *kElasticsearch = "elasticsearch"; /** Firebird */ static constexpr const char *kFirebirdsql = "firebirdsql"; /** Google Cloud Spanner */ static constexpr const char *kGcpSpanner = "gcp.spanner"; /** Apache Geode */ static constexpr const char *kGeode = "geode"; /** H2 Database */ static constexpr const char *kH2database = "h2database"; /** Apache HBase */ static constexpr const char *kHbase = "hbase"; /** Apache Hive */ static constexpr const char *kHive = "hive"; /** HyperSQL Database */ static constexpr const char *kHsqldb = "hsqldb"; /** IBM Db2 */ static constexpr const char *kIbmDb2 = "ibm.db2"; /** IBM Informix */ static constexpr const char *kIbmInformix = "ibm.informix"; /** IBM Netezza */ static constexpr const char *kIbmNetezza = "ibm.netezza"; /** InfluxDB */ static constexpr const char *kInfluxdb = "influxdb"; /** Instant */ static constexpr const char *kInstantdb = "instantdb"; /** MariaDB */ static constexpr const char *kMariadb = "mariadb"; /** Memcached */ static constexpr const char *kMemcached = "memcached"; /** MongoDB */ static constexpr const char *kMongodb = "mongodb"; /** Microsoft SQL Server */ static constexpr const char *kMicrosoftSqlServer = "microsoft.sql_server"; /** MySQL */ static constexpr const char *kMysql = "mysql"; /** Neo4j */ static constexpr const char *kNeo4j = "neo4j"; /** OpenSearch */ static constexpr const char *kOpensearch = "opensearch"; /** Oracle Database */ static constexpr const char *kOracleDb = "oracle.db"; /** PostgreSQL */ static constexpr const char *kPostgresql = "postgresql"; /** Redis */ static constexpr const char *kRedis = "redis"; /** SAP HANA */ static constexpr const char *kSapHana = "sap.hana"; /** SAP MaxDB */ static constexpr const char *kSapMaxdb = "sap.maxdb"; /** SQLite */ static constexpr const char *kSqlite = "sqlite"; /** Teradata */ static constexpr const char *kTeradata = "teradata"; /** Trino */ static constexpr const char *kTrino = "trino"; } // namespace DbSystemNameValues } // namespace db } // namespace semconv OPENTELEMETRY_END_NAMESPACE