Skip to content

Commit

Permalink
Clarify that name can be qualified with schema
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Apr 8, 2024
1 parent bfec763 commit 7a4e326
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/database/cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ described on this page.
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the database node where the operation was performed. [3] | `10.1.2.80`; `/tmp/my.sock` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | `Recommended` if and only if `network.peer.address` is set. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the database name.
**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the schema and database name.

**[2]:** For Cassandra the `db.name` should be set to the Cassandra keyspace name.

Expand Down
2 changes: 1 addition & 1 deletion docs/database/database-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ These attributes will usually be the same for all operations performed over the
| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | `Recommended` if and only if `network.peer.address` is set. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`server.address`](../attributes-registry/server.md) | string | Name of the database host. [8] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the database name.
**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the schema and database name.

**[2]:** In some SQL databases, the database name to be used is called "schema name". In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name).

Expand Down
2 changes: 1 addition & 1 deletion docs/database/mssql.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ described on this page.
| [`db.operation.name`](../attributes-registry/db.md) | string | The name of the operation or command being executed. [2] | `SELECT`; `INSERT`; `UPDATE`; `DELETE`; `CREATE`; `mystoredproc` | `Conditionally Required` [3] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`db.mssql.instance_name`](../attributes-registry/db.md) | string | The Microsoft SQL Server [instance name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. [4] | `MSSQLSERVER` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the database name.
**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the schema and database name.

**[2]:** This SHOULD be the SQL command such as `SELECT`, `INSERT`, `UPDATE`, `CREATE`, `DROP`.
In the case of `EXEC`, this SHOULD be the stored procedure name that is being executed.
Expand Down
2 changes: 1 addition & 1 deletion docs/database/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ described on this page.
| [`db.collection.name`](../attributes-registry/db.md) | string | The name of the SQL table that the operation is acting upon. | `public.users`; `customers` | `Conditionally Required` [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`db.operation.name`](../attributes-registry/db.md) | string | The name of the operation or command being executed. [2] | `SELECT`; `INSERT`; `UPDATE`; `DELETE`; `CREATE`; `mystoredproc` | `Conditionally Required` [3] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the database name.
**[1]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the schema and database name.

**[2]:** This SHOULD be the SQL command such as `SELECT`, `INSERT`, `UPDATE`, `CREATE`, `DROP`.
In the case of `EXEC`, this SHOULD be the stored procedure name that is being executed.
Expand Down
2 changes: 1 addition & 1 deletion model/trace/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ groups:
If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture
`db.collection.name`, then it SHOULD be the first collection name found in the query.
If the collection name is parsed from the query, it SHOULD match the value provided
in the query and may be qualified with the database name.
in the query and may be qualified with the schema and database name.
- ref: network.peer.address
brief: Peer address of the database node where the operation was performed.
requirement_level:
Expand Down

0 comments on commit 7a4e326

Please sign in to comment.