@@ -98,12 +98,13 @@ static constexpr const char *kDbClientConnectionsState = "db.client.connections.
98
98
* The name of a collection (table, container) within the database.
99
99
* <p>
100
100
* It is RECOMMENDED to capture the value as provided by the application without attempting to do
101
- * any case normalization. If the collection name is parsed from the query text, it SHOULD be the
102
- * first collection name found in the query and it SHOULD match the value provided in the query text
103
- * including any schema and database name prefix. For batch operations, if the individual operations
104
- * are known to have the same collection name then that collection name SHOULD be used, otherwise
105
- * @code db.collection.name @endcode SHOULD NOT be captured. This attribute has stability level
106
- * RELEASE CANDIDATE.
101
+ * any case normalization. <p> The collection name SHOULD NOT be extracted from @code db.query.text
102
+ * @endcode, unless the query format is known to only ever have a single collection name present.
103
+ * <p>
104
+ * For batch operations, if the individual operations are known to have the same collection name
105
+ * then that collection name SHOULD be used.
106
+ * <p>
107
+ * This attribute has stability level RELEASE CANDIDATE.
107
108
*/
108
109
static constexpr const char *kDbCollectionName = " db.collection.name" ;
109
110
@@ -126,6 +127,12 @@ static constexpr const char *kDbCosmosdbClientId = "db.cosmosdb.client_id";
126
127
*/
127
128
static constexpr const char *kDbCosmosdbConnectionMode = " db.cosmosdb.connection_mode" ;
128
129
130
+ /* *
131
+ * Account or request <a
132
+ * href="https://learn.microsoft.com/azure/cosmos-db/consistency-levels">consistency level</a>.
133
+ */
134
+ static constexpr const char *kDbCosmosdbConsistencyLevel = " db.cosmosdb.consistency_level" ;
135
+
129
136
/* *
130
137
* Deprecated, use @code db.collection.name @endcode instead.
131
138
* <p>
@@ -136,17 +143,30 @@ OPENTELEMETRY_DEPRECATED
136
143
static constexpr const char *kDbCosmosdbContainer = " db.cosmosdb.container" ;
137
144
138
145
/* *
139
- * Cosmos DB Operation Type.
146
+ * Deprecated, no replacement at this time.
147
+ * <p>
148
+ * @deprecated
149
+ * No replacement at this time.
140
150
*/
151
+ OPENTELEMETRY_DEPRECATED
141
152
static constexpr const char *kDbCosmosdbOperationType = " db.cosmosdb.operation_type" ;
142
153
143
154
/* *
144
- * RU consumed for that operation
155
+ * List of regions contacted during operation in the order that they were contacted. If there is
156
+ * more than one region listed, it indicates that the operation was performed on multiple regions
157
+ * i.e. cross-regional call. <p> Region name matches the format of @code displayName @endcode in <a
158
+ * href="https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location">Azure
159
+ * Location API</a>
160
+ */
161
+ static constexpr const char *kDbCosmosdbRegionsContacted = " db.cosmosdb.regions_contacted" ;
162
+
163
+ /* *
164
+ * Request units consumed for the operation.
145
165
*/
146
166
static constexpr const char *kDbCosmosdbRequestCharge = " db.cosmosdb.request_charge" ;
147
167
148
168
/* *
149
- * Request payload size in bytes
169
+ * Request payload size in bytes.
150
170
*/
151
171
static constexpr const char *kDbCosmosdbRequestContentLength = " db.cosmosdb.request_content_length" ;
152
172
@@ -270,25 +290,53 @@ static constexpr const char *kDbOperationBatchSize = "db.operation.batch.size";
270
290
/* *
271
291
* The name of the operation or command being executed.
272
292
* <p>
273
- * It is RECOMMENDED to capture the value as provided by the application without attempting to do
274
- * any case normalization. If the operation name is parsed from the query text, it SHOULD be the
275
- * first operation name found in the query. For batch operations, if the individual operations are
276
- * known to have the same operation name then that operation name SHOULD be used prepended by @code
277
- * BATCH @endcode, otherwise @code db.operation.name @endcode SHOULD be @code BATCH @endcode or
278
- * some other database system specific term if more applicable. This attribute has stability level
279
- * RELEASE CANDIDATE.
293
+ * It is RECOMMENDED to capture the value as provided by the application
294
+ * without attempting to do any case normalization.
295
+ * <p>
296
+ * The operation name SHOULD NOT be extracted from @code db.query.text @endcode,
297
+ * unless the query format is known to only ever have a single operation name present.
298
+ * <p>
299
+ * For batch operations, if the individual operations are known to have the same operation name
300
+ * then that operation name SHOULD be used prepended by @code BATCH @endcode,
301
+ * otherwise @code db.operation.name @endcode SHOULD be @code BATCH @endcode or some other database
302
+ * system specific term if more applicable.
303
+ * <p>
304
+ * This attribute has stability level RELEASE CANDIDATE.
280
305
*/
281
306
static constexpr const char *kDbOperationName = " db.operation.name" ;
282
307
308
+ /* *
309
+ * A database operation parameter, with @code <key> @endcode being the parameter name, and the
310
+ * attribute value being a string representation of the parameter value. <p> If a parameter has no
311
+ * name and instead is referenced only by index, then @code <key> @endcode SHOULD be the 0-based
312
+ * index. If @code db.query.text @endcode is also captured, then @code db.operation.parameter.<key>
313
+ * @endcode SHOULD match up with the parameterized placeholders present in @code db.query.text
314
+ * @endcode. This attribute has stability level RELEASE CANDIDATE.
315
+ */
316
+ static constexpr const char *kDbOperationParameter = " db.operation.parameter" ;
317
+
283
318
/* *
284
319
* A query parameter used in @code db.query.text @endcode, with @code <key> @endcode being the
285
320
* parameter name, and the attribute value being a string representation of the parameter value. <p>
286
- * Query parameters should only be captured when @code db.query.text @endcode is parameterized with
287
- * placeholders. If a parameter has no name and instead is referenced only by index, then @code
288
- * <key> @endcode SHOULD be the 0-based index. This attribute has stability level RELEASE CANDIDATE.
321
+ * @deprecated
322
+ * Replaced by @code db.operation.parameter @endcode.
289
323
*/
324
+ OPENTELEMETRY_DEPRECATED
290
325
static constexpr const char *kDbQueryParameter = " db.query.parameter" ;
291
326
327
+ /* *
328
+ * Low cardinality representation of a database query text.
329
+ * <p>
330
+ * @code db.query.summary @endcode provides static summary of the query text. It describes a class
331
+ * of database queries and is useful as a grouping key, especially when analyzing telemetry for
332
+ * database calls involving complex queries. Summary may be available to the instrumentation through
333
+ * instrumentation hooks or other means. If it is not available, instrumentations that support query
334
+ * parsing SHOULD generate a summary following <a
335
+ * href="../../docs/database/database-spans.md#generating-a-summary-of-the-query-text">Generating
336
+ * query summary</a> section. This attribute has stability level RELEASE CANDIDATE.
337
+ */
338
+ static constexpr const char *kDbQuerySummary = " db.query.summary" ;
339
+
292
340
/* *
293
341
* The database query being executed.
294
342
* <p>
@@ -314,6 +362,11 @@ static constexpr const char *kDbQueryText = "db.query.text";
314
362
OPENTELEMETRY_DEPRECATED
315
363
static constexpr const char *kDbRedisDatabaseIndex = " db.redis.database_index" ;
316
364
365
+ /* *
366
+ * Number of rows returned by the operation.
367
+ */
368
+ static constexpr const char *kDbResponseReturnedRows = " db.response.returned_rows" ;
369
+
317
370
/* *
318
371
* Database response status code.
319
372
* <p>
@@ -452,7 +505,7 @@ static constexpr const char *kUsed = "used";
452
505
namespace DbCosmosdbConnectionModeValues
453
506
{
454
507
/* *
455
- * Gateway (HTTP) connections mode
508
+ * Gateway (HTTP) connection.
456
509
*/
457
510
static constexpr const char *kGateway = " gateway" ;
458
511
@@ -463,6 +516,35 @@ static constexpr const char *kDirect = "direct";
463
516
464
517
} // namespace DbCosmosdbConnectionModeValues
465
518
519
+ namespace DbCosmosdbConsistencyLevelValues
520
+ {
521
+ /* *
522
+ * none
523
+ */
524
+ static constexpr const char *kStrong = " Strong" ;
525
+
526
+ /* *
527
+ * none
528
+ */
529
+ static constexpr const char *kBoundedStaleness = " BoundedStaleness" ;
530
+
531
+ /* *
532
+ * none
533
+ */
534
+ static constexpr const char *kSession = " Session" ;
535
+
536
+ /* *
537
+ * none
538
+ */
539
+ static constexpr const char *kEventual = " Eventual" ;
540
+
541
+ /* *
542
+ * none
543
+ */
544
+ static constexpr const char *kConsistentPrefix = " ConsistentPrefix" ;
545
+
546
+ } // namespace DbCosmosdbConsistencyLevelValues
547
+
466
548
namespace DbCosmosdbOperationTypeValues
467
549
{
468
550
/* *
0 commit comments