Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database: clarify list of SQL db.systems #1024

Merged
merged 9 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
trask marked this conversation as resolved.
Show resolved Hide resolved

- `cockroachdb`
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
- `db2`
- `derby`
- `edb`
- `firebird`
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
- `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
Loading