Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Apr 5, 2024
1 parent f066613 commit 123f3f7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 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, when the instrumentation library supports parsing `db.statement` and it's enabled, `db.collection.name` SHOULD be set to the first table name found in the CQL query.
**[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.

**[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 @@ -85,7 +85,7 @@ Some database systems may allow a connection to switch to a different `db.user`,
| [`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, when the instrumentation library supports parsing `db.statement` and it's enabled, `db.collection.name` SHOULD be set to 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 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, when the instrumentation library supports parsing `db.statement` and it's enabled, `db.collection.name` SHOULD be set to the first table name found in the SQL query. If the operation is acting upon an anonymous table, this value MUST NOT be set.
**[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.

**[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 primary 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, when the instrumentation library supports parsing `db.statement` and it's enabled, `db.collection.name` SHOULD be set to the first table name found in the SQL query. If the operation is acting upon an anonymous table, this value MUST NOT be set.
**[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.

**[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
13 changes: 2 additions & 11 deletions model/trace/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ groups:
- ref: db.collection.name
requirement_level:
conditionally_required: >
If readily available. Otherwise, when the instrumentation library supports parsing `db.statement` and it's enabled,
`db.collection.name` SHOULD be set to the first collection name found in the query.
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.
- ref: network.peer.address
Expand Down Expand Up @@ -94,10 +94,6 @@ groups:
tag: tech-specific
- ref: db.collection.name
brief: The name of the Cassandra table that the operation is acting upon.
requirement_level:
conditionally_required: >
If readily available. Otherwise, when the instrumentation library supports parsing `db.statement` and it's enabled,
`db.collection.name` SHOULD be set to the first table name found in the CQL query.
tag: tech-specific
- ref: db.cassandra.idempotence
tag: tech-specific
Expand Down Expand Up @@ -237,11 +233,6 @@ groups:
tag: tech-specific
- ref: db.collection.name
brief: The name of the primary table that the operation is acting upon.
requirement_level:
conditionally_required: >
If readily available. Otherwise, when the instrumentation library supports parsing `db.statement` and it's enabled,
`db.collection.name` SHOULD be set to the first table name found in the SQL query.
If the operation is acting upon an anonymous table, this value MUST NOT be set.
tag: tech-specific

- id: db.cosmosdb
Expand Down

0 comments on commit 123f3f7

Please sign in to comment.