Skip to content

Commit

Permalink
Database: clarify list of SQL db.systems (open-telemetry#1024)
Browse files Browse the repository at this point in the history
Co-authored-by: Trask Stalnaker <[email protected]>
Co-authored-by: Joao Grassi <[email protected]>
  • Loading branch information
3 people authored May 29, 2024
1 parent e3217be commit b56bad3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .chloggen/1024.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: enhancement
component: db
note: List SQL database systems on the SQL semantic conventions.
issues: [1024]
35 changes: 28 additions & 7 deletions docs/database/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"` |

Expand Down

0 comments on commit b56bad3

Please sign in to comment.