From b56bad395b887afa1323dab4e87e8e7982f78472 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 29 May 2024 17:57:14 +0100 Subject: [PATCH] Database: clarify list of SQL `db.system`s (#1024) Co-authored-by: Trask Stalnaker Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> --- .chloggen/1024.yaml | 4 ++++ docs/database/sql.md | 35 ++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 .chloggen/1024.yaml diff --git a/.chloggen/1024.yaml b/.chloggen/1024.yaml new file mode 100644 index 0000000000..d4d2a34b7d --- /dev/null +++ b/.chloggen/1024.yaml @@ -0,0 +1,4 @@ +change_type: enhancement +component: db +note: List SQL database systems on the SQL semantic conventions. +issues: [1024] diff --git a/docs/database/sql.md b/docs/database/sql.md index f413aeaac8..5529468337 100644 --- a/docs/database/sql.md +++ b/docs/database/sql.md @@ -6,9 +6,33 @@ linkTitle: SQL **Status**: [Experimental][DocumentStatus] -The SQL databases Semantic Conventions extend and override the [Database Semantic Conventions](database-spans.md) -that describe common database operations attributes in addition to the Semantic Conventions -described on this page. +The SQL databases Semantic Conventions describes how common [Database Semantic Conventions](database-spans.md) apply to SQL databases. + +The following database systems (defined in the [`db.system`](./database-spans.md#notes-and-well-known-identifiers-for-dbsystem) set) are known to use SQL as their primary query language: + +- `cockroachdb` +- `db2` +- `derby` +- `edb` +- `firebird` +- `h2` +- `hsqldb` +- `ingres` +- `interbase` +- `mariadb` +- `maxdb` +- `mssql` +- `mssqlcompact` +- `mysql` +- `oracle` +- `other_sql` +- `pervasive` +- `postgresql` +- `sqlite` +- `trino` + +Many other database systems support SQL and can be accessed via generic database driver such as JDBC or ODBC. +Instrumentations applied to generic SQL drivers SHOULD adhere to SQL semantic conventions. ## Attributes @@ -97,15 +121,12 @@ This is an example of attributes for a MySQL database span: | Key | Value | |:-----------------------| :----------------------------------------------------------- | -| Span name | `"SELECT ShopDb.orders"` | +| Span name | `"SELECT orders"` | | `db.collection.name` | `"orders"` | | `db.namespace` | `"ShopDb"` | | `db.system` | `"mysql"` | | `server.address` | `"shopdb.example.com"` | | `server.port` | `3306` | -| `network.peer.address` | `"192.0.2.12"` | -| `network.peer.port` | `3306` | -| `network.transport` | `"tcp"` | | `db.query.text` | `"SELECT * FROM orders WHERE order_id = 'o4711'"` | | `db.operation.name` | `"SELECT"` |