Database: clarify list of SQL `db.system`s (#1024)

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
This commit is contained in:
Liudmila Molkova 2024-05-29 17:57:14 +01:00 committed by GitHub
parent e3217bea91
commit b56bad395b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 7 deletions

4
.chloggen/1024.yaml Normal file
View File

@ -0,0 +1,4 @@
change_type: enhancement
component: db
note: List SQL database systems on the SQL semantic conventions.
issues: [1024]

View File

@ -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"` |