You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/db/cassandra.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,8 @@ Spans representing calls to a Cassandra database adhere to the general [Semantic
64
64
**[2]`db.collection.name`:** It is RECOMMENDED to capture the value as provided by the application
65
65
without attempting to do any case normalization.
66
66
67
-
For batch operations, if the individual operations are known to have the same collection name
67
+
For batch operations, if the individual operations would all have the same
68
+
`db.collection.name` when executed as non-batch operations,
68
69
then that collection name SHOULD be used.
69
70
70
71
**[3]`db.namespace`:** If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted.
@@ -83,9 +84,10 @@ in non-batch operations.
83
84
If spaces can occur in the operation name, multiple consecutive spaces
84
85
SHOULD be normalized to a single space.
85
86
86
-
For batch operations, if the individual operations are known to have the same operation name
87
-
then that operation name SHOULD be used prepended by `BATCH `,
88
-
otherwise `db.operation.name` SHOULD be `BATCH` or some other database
87
+
For batch operations, if the individual operations would all have the same
88
+
`db.operation.name` when executed as non-batch operations,
89
+
then that operation name SHOULD be used prepended by `BATCH `.
90
+
Otherwise, `db.operation.name` SHOULD be `BATCH` or some other database
89
91
system specific term if more applicable.
90
92
91
93
**[6]`db.response.status_code`:** If the operation failed and status code is available.
@@ -135,16 +137,17 @@ that support query parsing SHOULD generate a summary following
For batch operations, if the individual operations are known to have the same query summary
139
-
then that query summary SHOULD be used prepended by `BATCH `,
140
-
otherwise `db.query.summary` SHOULD be `BATCH` or some other database
140
+
For batch operations, if the individual operations would all have the same
141
+
`db.query.summary` when executed as non-batch operations,
142
+
then that query summary SHOULD be used prepended by `BATCH `.
143
+
Otherwise, `db.query.summary` SHOULD be `BATCH` or some other database
141
144
system specific term if more applicable.
142
145
143
146
**[14]`db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext).
144
147
Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.query.parameter.<key>`](/docs/registry/attributes/db.md)).
145
148
146
149
**[15]`db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext).
147
-
For batch operations, if the individual operations are known to have the same querytextthen that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
150
+
For batch operations, if the individual operations would all have the same `db.query.text` when executed as non-batch operations, then that query text SHOULD be used. Otherwise, all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
148
151
Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
149
152
150
153
**[16]`db.response.returned_rows`:** The number of rows returned by the database operation as observed
Copy file name to clipboardExpand all lines: docs/db/cosmosdb.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,16 +233,17 @@ A request to execute a batch operation with no operations SHOULD also be treated
233
233
as a batch operation, and `db.operation.batch.size` SHOULD be set to `0`.
234
234
235
235
**[10]`db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext).
236
-
For batch operations, if the individual operations are known to have the same querytextthen that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
236
+
For batch operations, if the individual operations would all have the same `db.query.text` when executed as non-batch operations, then that query text SHOULD be used. Otherwise, all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
237
237
Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
238
238
239
239
**[11]`db.stored_procedure.name`:** If operation applies to a specific stored procedure.
240
240
241
241
**[12]`db.stored_procedure.name`:** It is RECOMMENDED to capture the value as provided by the application
242
242
without attempting to do any case normalization.
243
243
244
-
For batch operations, if the individual operations are known to have the same
245
-
stored procedure name then that stored procedure name SHOULD be used.
244
+
For batch operations, if the individual operations would all have the same
245
+
`db.stored_procedure.name` when executed as non-batch operations,
246
+
then that stored procedure name SHOULD be used.
246
247
247
248
**[13]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
248
249
@@ -403,9 +404,10 @@ in non-batch operations.
403
404
If spaces can occur in the operation name, multiple consecutive spaces
404
405
SHOULD be normalized to a single space.
405
406
406
-
For batch operations, if the individual operations are known to have the same operation name
407
-
then that operation name SHOULD be used prepended by `BATCH `,
408
-
otherwise `db.operation.name` SHOULD be `BATCH` or some other database
407
+
For batch operations, if the individual operations would all have the same
408
+
`db.operation.name` when executed as non-batch operations,
409
+
then that operation name SHOULD be used prepended by `BATCH `.
410
+
Otherwise, `db.operation.name` SHOULD be `BATCH` or some other database
409
411
system specific term if more applicable.
410
412
411
413
**[2]`db.collection.name`:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
Copy file name to clipboardExpand all lines: docs/db/database-metrics.md
+27-20Lines changed: 27 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,8 +104,9 @@ The collection name SHOULD NOT be extracted from `db.query.text`,
104
104
when the database system supports query text with multiple collections
105
105
in non-batch operations.
106
106
107
-
For batch operations, if the individual operations are known to have the same
108
-
collection name then that collection name SHOULD be used.
107
+
For batch operations, if the individual operations would all have the same
108
+
`db.collection.name` when executed as non-batch operations,
109
+
then that collection name SHOULD be used.
109
110
110
111
**[4]`db.namespace`:** If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted.
111
112
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
@@ -123,9 +124,10 @@ in non-batch operations.
123
124
If spaces can occur in the operation name, multiple consecutive spaces
124
125
SHOULD be normalized to a single space.
125
126
126
-
For batch operations, if the individual operations are known to have the same operation name
127
-
then that operation name SHOULD be used prepended by `BATCH `,
128
-
otherwise `db.operation.name` SHOULD be `BATCH` or some other database
127
+
For batch operations, if the individual operations would all have the same
128
+
`db.operation.name` when executed as non-batch operations,
129
+
then that operation name SHOULD be used prepended by `BATCH `.
130
+
Otherwise, `db.operation.name` SHOULD be `BATCH` or some other database
129
131
system specific term if more applicable.
130
132
131
133
**[7]`db.response.status_code`:** If the operation failed and status code is available.
@@ -153,26 +155,28 @@ that support query parsing SHOULD generate a summary following
For batch operations, if the individual operations are known to have the same query summary
157
-
then that query summary SHOULD be used prepended by `BATCH `,
158
-
otherwise `db.query.summary` SHOULD be `BATCH` or some other database
158
+
For batch operations, if the individual operations would all have the same
159
+
`db.query.summary` when executed as non-batch operations,
160
+
then that query summary SHOULD be used prepended by `BATCH `.
161
+
Otherwise, `db.query.summary` SHOULD be `BATCH` or some other database
159
162
system specific term if more applicable.
160
163
161
164
**[14]`db.stored_procedure.name`:** If operation applies to a specific stored procedure.
162
165
163
166
**[15]`db.stored_procedure.name`:** It is RECOMMENDED to capture the value as provided by the application
164
167
without attempting to do any case normalization.
165
168
166
-
For batch operations, if the individual operations are known to have the same
167
-
stored procedure name then that stored procedure name SHOULD be used.
169
+
For batch operations, if the individual operations would all have the same
170
+
`db.stored_procedure.name` when executed as non-batch operations,
171
+
then that stored procedure name SHOULD be used.
168
172
169
173
**[16]`network.peer.address`:** Semantic conventions for individual database systems SHOULD document whether `network.peer.*` attributes are applicable. Network peer address and port are useful when the application interacts with individual database nodes directly.
170
174
If a database operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used.
171
175
172
176
**[17]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
173
177
174
178
**[18]`db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext).
175
-
For batch operations, if the individual operations are known to have the same querytextthen that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
179
+
For batch operations, if the individual operations would all have the same `db.query.text` when executed as non-batch operations, then that query text SHOULD be used. Otherwise, all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
176
180
Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
177
181
178
182
---
@@ -293,8 +297,9 @@ The collection name SHOULD NOT be extracted from `db.query.text`,
293
297
when the database system supports query text with multiple collections
294
298
in non-batch operations.
295
299
296
-
For batch operations, if the individual operations are known to have the same
297
-
collection name then that collection name SHOULD be used.
300
+
For batch operations, if the individual operations would all have the same
301
+
`db.collection.name` when executed as non-batch operations,
302
+
then that collection name SHOULD be used.
298
303
299
304
**[4]`db.namespace`:** If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted.
300
305
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
@@ -312,9 +317,10 @@ in non-batch operations.
312
317
If spaces can occur in the operation name, multiple consecutive spaces
313
318
SHOULD be normalized to a single space.
314
319
315
-
For batch operations, if the individual operations are known to have the same operation name
316
-
then that operation name SHOULD be used prepended by `BATCH `,
317
-
otherwise `db.operation.name` SHOULD be `BATCH` or some other database
320
+
For batch operations, if the individual operations would all have the same
321
+
`db.operation.name` when executed as non-batch operations,
322
+
then that operation name SHOULD be used prepended by `BATCH `.
323
+
Otherwise, `db.operation.name` SHOULD be `BATCH` or some other database
318
324
system specific term if more applicable.
319
325
320
326
**[7]`db.response.status_code`:** If the operation failed and status code is available.
@@ -342,9 +348,10 @@ that support query parsing SHOULD generate a summary following
For batch operations, if the individual operations are known to have the same query summary
346
-
then that query summary SHOULD be used prepended by `BATCH `,
347
-
otherwise `db.query.summary` SHOULD be `BATCH` or some other database
351
+
For batch operations, if the individual operations would all have the same
352
+
`db.query.summary` when executed as non-batch operations,
353
+
then that query summary SHOULD be used prepended by `BATCH `.
354
+
Otherwise, `db.query.summary` SHOULD be `BATCH` or some other database
348
355
system specific term if more applicable.
349
356
350
357
**[14]`network.peer.address`:** Semantic conventions for individual database systems SHOULD document whether `network.peer.*` attributes are applicable. Network peer address and port are useful when the application interacts with individual database nodes directly.
@@ -353,7 +360,7 @@ If a database operation involved multiple network calls (for example retries), t
353
360
**[15]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
354
361
355
362
**[16]`db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext).
356
-
For batch operations, if the individual operations are known to have the same querytextthen that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
363
+
For batch operations, if the individual operations would all have the same `db.query.text` when executed as non-batch operations, then that query text SHOULD be used. Otherwise, all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
357
364
Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
0 commit comments