From 0e6aae3dd5366497c9f5ffa1efe5afd19c655043 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 18 Apr 2024 08:00:34 -0700 Subject: [PATCH] Replace `db.statement` with `db.query.text` in examples (#932) --- docs/database/database-spans.md | 4 ++-- docs/database/elasticsearch.md | 2 +- docs/database/mongodb.md | 2 +- docs/database/redis.md | 2 +- docs/database/sql.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index d43277f9d..275ae4e5a 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -57,7 +57,7 @@ Since SQL statements may have very high cardinality even without arguments, SQL following way, unless the statement is known to be of low cardinality: ` .`, provided that `db.operation.name` and `db.collection.name` are available. If `db.collection.name` is not available due to its semantics, the span SHOULD be named ` `. -It is not recommended to attempt any client-side parsing of `db.statement` just to get these properties, +It is not recommended to attempt any client-side parsing of `db.query.text` just to get these properties, they should only be used if the library being instrumented already provides them. When it's otherwise impossible to get any meaningful span name, `db.name` or the tech-specific database name MAY be used. @@ -178,7 +178,7 @@ This allows multiple instrumentations for the same database to be aligned and ea The value `other_sql` is intended as a fallback and MUST only be used if the DBMS is known to be SQL-compliant but the concrete product is not known to the instrumentation. If the concrete DBMS is known to the instrumentation, its specific identifier MUST be used. -Back ends could, for example, use the provided identifier to determine the appropriate SQL dialect for parsing the `db.statement`. +Back ends could, for example, use the provided identifier to determine the appropriate SQL dialect for parsing the `db.query.text`. When additional attributes are added that only apply to a specific DBMS, its identifier SHOULD be used as a namespace in the attribute key as for the attributes in the sections below. diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index 1ef894e18..f95b4ffe8 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -100,7 +100,7 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original | `server.address` | `"elasticsearch.mydomain.com"` | | `server.port` | `9200` | | `http.request.method` | `"GET"` | -| `db.statement` | `"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"` | +| `db.query.text` | `"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"` | | `db.operation.name` | `"search"` | | `url.full` | `"https://elasticsearch.mydomain.com:9200/my-index-000001/_search?from=40&size=20"` | | `db.elasticsearch.path_parts.index` | `"my-index-000001"` | diff --git a/docs/database/mongodb.md b/docs/database/mongodb.md index 8f375ca88..be34d3430 100644 --- a/docs/database/mongodb.md +++ b/docs/database/mongodb.md @@ -39,7 +39,7 @@ described on this page. | `network.peer.port` | `27017` | | `network.transport` | `"tcp"` | | `db.name` | `"shopDb"` | -| `db.statement` | not set | +| `db.query.text` | not set | | `db.operation.name` | `"findAndModify"` | | `db.mongodb.collection` | `"products"` | diff --git a/docs/database/redis.md b/docs/database/redis.md index 6a8e94e05..27b9e0461 100644 --- a/docs/database/redis.md +++ b/docs/database/redis.md @@ -41,7 +41,7 @@ Furthermore, `db.name` is not specified as there is no database name in Redis an | `network.peer.address` | `"/tmp/redis.sock"` | | `network.transport` | `"unix"` | | `db.name` | not set | -| `db.statement` | `"HMSET myhash field1 'Hello' field2 'World"` | +| `db.query.text` | `"HMSET myhash field1 'Hello' field2 'World"` | | `db.operation.name` | not set | | `db.redis.database_index` | `15` | diff --git a/docs/database/sql.md b/docs/database/sql.md index 12d24d344..dcd4d0ba2 100644 --- a/docs/database/sql.md +++ b/docs/database/sql.md @@ -42,7 +42,7 @@ This is an example of attributes for a MySQL database span: | `network.peer.port` | `3306` | | `network.transport` | `"tcp"` | | `db.name` | `"ShopDb"` | -| `db.statement` | `"SELECT * FROM orders WHERE order_id = 'o4711'"` | +| `db.query.text` | `"SELECT * FROM orders WHERE order_id = 'o4711'"` | | `db.operation.name` | `"SELECT"` | | `db.collection.name` | `"orders"` |