From 0aed08176a058ab6c9ae4789134c235c7dae9dbc Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 8 Apr 2024 10:08:19 -0700 Subject: [PATCH] change db.statement in notes to new attribute --- docs/database/cassandra.md | 2 +- docs/database/couchdb.md | 2 +- docs/database/database-spans.md | 4 ++-- docs/database/mongodb.md | 2 +- docs/database/mssql.md | 4 ++-- docs/database/sql.md | 4 ++-- model/trace/database.yaml | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/database/cassandra.md b/docs/database/cassandra.md index 565996cf57..b726721e92 100644 --- a/docs/database/cassandra.md +++ b/docs/database/cassandra.md @@ -30,7 +30,7 @@ described on this page. **[1]:** 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]:** 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. +**[2]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. **[3]:** For Cassandra the `db.name` should be set to the Cassandra keyspace name. diff --git a/docs/database/couchdb.md b/docs/database/couchdb.md index 20d4963add..6c3ad89c72 100644 --- a/docs/database/couchdb.md +++ b/docs/database/couchdb.md @@ -21,7 +21,7 @@ described on this page. **[1]:** In **CouchDB**, `db.operation.name` should be set to the HTTP method + the target REST route according to the API reference documentation. For example, when retrieving a document, `db.operation.name` would be set to (literally, i.e., without replacing the placeholders with concrete values): [`GET /{db}/{docid}`](https://docs.couchdb.org/en/stable/api/document/common.html#get--db-docid). -**[2]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. +**[2]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 6390a36004..937e8a5770 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -86,11 +86,11 @@ These attributes will usually be the same for all operations performed over the **[1]:** 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]:** 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. +**[2]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. **[3]:** 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). -**[4]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. +**[4]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. **[5]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available. diff --git a/docs/database/mongodb.md b/docs/database/mongodb.md index c0003900c4..de02a0b6ba 100644 --- a/docs/database/mongodb.md +++ b/docs/database/mongodb.md @@ -24,7 +24,7 @@ described on this page. **[2]:** See [MongoDB database commands](https://www.mongodb.com/docs/manual/reference/command/). -**[3]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. +**[3]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. ## Example diff --git a/docs/database/mssql.md b/docs/database/mssql.md index 0f550c1471..e4c0774857 100644 --- a/docs/database/mssql.md +++ b/docs/database/mssql.md @@ -23,12 +23,12 @@ described on this page. **[1]:** 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]:** 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. +**[2]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. **[3]:** 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. -**[4]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. +**[4]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. **[5]:** If setting a `db.mssql.instance_name`, `server.port` is no longer required (but still recommended if non-standard). diff --git a/docs/database/sql.md b/docs/database/sql.md index 6cffedd485..60bf0b8cf8 100644 --- a/docs/database/sql.md +++ b/docs/database/sql.md @@ -20,12 +20,12 @@ described on this page. **[1]:** 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]:** 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. +**[2]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. **[3]:** 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. -**[4]:** If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. +**[4]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. ## Example diff --git a/model/trace/database.yaml b/model/trace/database.yaml index 71c4147ebb..b4ed7d0da6 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -17,7 +17,7 @@ groups: - ref: db.operation.name requirement_level: conditionally_required: > - If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture + If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query. - ref: server.address brief: > @@ -31,7 +31,7 @@ groups: - ref: db.collection.name requirement_level: conditionally_required: > - If readily available. Otherwise, if the instrumentation library parses `db.statement` to capture + If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query. - ref: network.peer.address brief: Peer address of the database node where the operation was performed.