Replace `db.statement` with `db.query.text` in examples (#932)
This commit is contained in:
parent
ac9f85f058
commit
0e6aae3dd5
|
|
@ -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:
|
following way, unless the statement is known to be of low cardinality:
|
||||||
`<db.operation.name> <db.name>.<db.collection.name>`, provided that `db.operation.name` and `db.collection.name` are available.
|
`<db.operation.name> <db.name>.<db.collection.name>`, 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 `<db.operation.name> <db.name>`.
|
If `db.collection.name` is not available due to its semantics, the span SHOULD be named `<db.operation.name> <db.name>`.
|
||||||
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
|
||||||
| `server.address` | `"elasticsearch.mydomain.com"` |
|
| `server.address` | `"elasticsearch.mydomain.com"` |
|
||||||
| `server.port` | `9200` |
|
| `server.port` | `9200` |
|
||||||
| `http.request.method` | `"GET"` |
|
| `http.request.method` | `"GET"` |
|
||||||
| `db.statement` | `"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"` |
|
| `db.query.text` | `"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"` |
|
||||||
| `db.operation.name` | `"search"` |
|
| `db.operation.name` | `"search"` |
|
||||||
| `url.full` | `"https://elasticsearch.mydomain.com:9200/my-index-000001/_search?from=40&size=20"` |
|
| `url.full` | `"https://elasticsearch.mydomain.com:9200/my-index-000001/_search?from=40&size=20"` |
|
||||||
| `db.elasticsearch.path_parts.index` | `"my-index-000001"` |
|
| `db.elasticsearch.path_parts.index` | `"my-index-000001"` |
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ described on this page.
|
||||||
| `network.peer.port` | `27017` |
|
| `network.peer.port` | `27017` |
|
||||||
| `network.transport` | `"tcp"` |
|
| `network.transport` | `"tcp"` |
|
||||||
| `db.name` | `"shopDb"` |
|
| `db.name` | `"shopDb"` |
|
||||||
| `db.statement` | not set |
|
| `db.query.text` | not set |
|
||||||
| `db.operation.name` | `"findAndModify"` |
|
| `db.operation.name` | `"findAndModify"` |
|
||||||
| `db.mongodb.collection` | `"products"` |
|
| `db.mongodb.collection` | `"products"` |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.peer.address` | `"/tmp/redis.sock"` |
|
||||||
| `network.transport` | `"unix"` |
|
| `network.transport` | `"unix"` |
|
||||||
| `db.name` | not set |
|
| `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.operation.name` | not set |
|
||||||
| `db.redis.database_index` | `15` |
|
| `db.redis.database_index` | `15` |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ This is an example of attributes for a MySQL database span:
|
||||||
| `network.peer.port` | `3306` |
|
| `network.peer.port` | `3306` |
|
||||||
| `network.transport` | `"tcp"` |
|
| `network.transport` | `"tcp"` |
|
||||||
| `db.name` | `"ShopDb"` |
|
| `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.operation.name` | `"SELECT"` |
|
||||||
| `db.collection.name` | `"orders"` |
|
| `db.collection.name` | `"orders"` |
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue