Semantic conventions for database calls and systems
Status: Mixed
This document defines semantic conventions for database client spans as well as database metrics and logs.
Warning
Existing database instrumentations that are using v1.24.0 of this document (or prior):
- SHOULD NOT change the version of the database conventions that they emit by default in their existing major version. Conventions include (but are not limited to) attributes, metric and span names, and unit of measure.
- SHOULD introduce an environment variable
OTEL_SEMCONV_STABILITY_OPT_IN
in their existing major version as a comma-separated list of category-specific values (e.g., http, databases, messaging). The list of values includes:
database
- emit the stable database conventions, and stop emitting the experimental database conventions that the instrumentation emitted previously.database/dup
- emit both the experimental and stable database conventions, allowing for a phased rollout of the stable semantic conventions.- The default behavior (in the absence of one of these values) is to continue emitting whatever version of the old experimental database conventions the instrumentation was emitting previously.
- Note:
database/dup
has higher precedence thandatabase
in case both values are present- SHOULD maintain (security patching at a minimum) their existing major version for at least six months after it starts emitting both sets of conventions.
- MAY drop the environment variable in their next major version and emit only the stable database conventions.
Semantic conventions for database operations are defined for the following signals:
- DB Spans: Semantic Conventions for database client spans.
- DB Metrics: Semantic Conventions for database operation metrics.
Technology specific semantic conventions are defined for the following databases:
- AWS DynamoDB: Semantic Conventions for AWS DynamoDB.
- Cassandra: Semantic Conventions for Cassandra.
- Azure Cosmos DB: Semantic Conventions for Azure Cosmos DB.
- CouchDB: Semantic Conventions for CouchDB.
- Elasticsearch: Semantic Conventions for Elasticsearch.
- HBase: Semantic Conventions for HBase.
- MongoDB: Semantic Conventions for MongoDB.
- Microsoft SQL Server: Semantic Conventions for Microsoft SQL Server.
- Oracle Database: Semantic Conventions for Oracle Database.
- Redis: Semantic Conventions for Redis.
- SQL: Semantic Conventions for SQL databases.
Feedback
Was this page helpful?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!