@@ -88,10 +88,9 @@ object DbExperimentalAttributes {
8888 /** The name of a collection (table, container) within the database. <p>
8989 * @note
9090 * <p> It is RECOMMENDED to capture the value as provided by the application without attempting to do any case
91- * normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name
92- * found in the query and it SHOULD match the value provided in the query text including any schema and database
93- * name prefix. For batch operations, if the individual operations are known to have the same collection name then
94- * that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. This attribute has
91+ * normalization. <p> The collection name SHOULD NOT be extracted from `db.query.text`, unless the query format is
92+ * known to only ever have a single collection name present. <p> For batch operations, if the individual operations
93+ * are known to have the same collection name then that collection name SHOULD be used. <p> This attribute has
9594 * stability level RELEASE CANDIDATE.
9695 */
9796 val DbCollectionName : AttributeKey [String ] =
@@ -113,23 +112,39 @@ object DbExperimentalAttributes {
113112 val DbCosmosdbConnectionMode : AttributeKey [String ] =
114113 AttributeKey (" db.cosmosdb.connection_mode" )
115114
115+ /** Account or request <a href="https://learn.microsoft.com/azure/cosmos-db/consistency-levels">consistency level</a>.
116+ */
117+ val DbCosmosdbConsistencyLevel : AttributeKey [String ] =
118+ AttributeKey (" db.cosmosdb.consistency_level" )
119+
116120 /** Deprecated, use `db.collection.name` instead.
117121 */
118122 @ deprecated(" Replaced by `db.collection.name`." , " " )
119123 val DbCosmosdbContainer : AttributeKey [String ] =
120124 AttributeKey (" db.cosmosdb.container" )
121125
122- /** Cosmos DB Operation Type .
126+ /** Deprecated, no replacement at this time .
123127 */
128+ @ deprecated(" No replacement at this time." , " " )
124129 val DbCosmosdbOperationType : AttributeKey [String ] =
125130 AttributeKey (" db.cosmosdb.operation_type" )
126131
127- /** RU consumed for that operation
132+ /** List of regions contacted during operation in the order that they were contacted. If there is more than one region
133+ * listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. <p>
134+ * @note
135+ * <p> Region name matches the format of `displayName` in <a
136+ * href="https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location">Azure
137+ * Location API</a>
138+ */
139+ val DbCosmosdbRegionsContacted : AttributeKey [Seq [String ]] =
140+ AttributeKey (" db.cosmosdb.regions_contacted" )
141+
142+ /** Request units consumed for the operation.
128143 */
129144 val DbCosmosdbRequestCharge : AttributeKey [Double ] =
130145 AttributeKey (" db.cosmosdb.request_charge" )
131146
132- /** Request payload size in bytes
147+ /** Request payload size in bytes.
133148 */
134149 val DbCosmosdbRequestContentLength : AttributeKey [Long ] =
135150 AttributeKey (" db.cosmosdb.request_content_length" )
@@ -230,25 +245,44 @@ object DbExperimentalAttributes {
230245 /** The name of the operation or command being executed. <p>
231246 * @note
232247 * <p> It is RECOMMENDED to capture the value as provided by the application without attempting to do any case
233- * normalization. If the operation name is parsed from the query text, it SHOULD be the first operation name found
234- * in the query. For batch operations, if the individual operations are known to have the same operation name then
235- * that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or
236- * some other database system specific term if more applicable. This attribute has stability level RELEASE
237- * CANDIDATE.
248+ * normalization. <p> The operation name SHOULD NOT be extracted from `db.query. text`, unless the query format is
249+ * known to only ever have a single operation name present. <p> For batch operations, if the individual operations
250+ * are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `,
251+ * otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable.
252+ * <p> This attribute has stability level RELEASE CANDIDATE.
238253 */
239254 val DbOperationName : AttributeKey [String ] =
240255 AttributeKey (" db.operation.name" )
241256
242- /** A query parameter used in `db.query.text` , with `<key>` being the parameter name, and the attribute value being a
243- * string representation of the parameter value. <p>
257+ /** A database operation parameter , with `<key>` being the parameter name, and the attribute value being a string
258+ * representation of the parameter value. <p>
244259 * @note
245- * <p> Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a
246- * parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index. This
247- * attribute has stability level RELEASE CANDIDATE.
260+ * <p> If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based
261+ * index. If `db.query.text` is also captured, then `db.operation.parameter.<key>` SHOULD match up with the
262+ * parameterized placeholders present in `db.query.text`. This attribute has stability level RELEASE CANDIDATE.
263+ */
264+ val DbOperationParameter : AttributeKey [String ] =
265+ AttributeKey (" db.operation.parameter" )
266+
267+ /** A query parameter used in `db.query.text`, with `<key>` being the parameter name, and the attribute value being a
268+ * string representation of the parameter value.
248269 */
270+ @ deprecated(" Replaced by `db.operation.parameter`." , " " )
249271 val DbQueryParameter : AttributeKey [String ] =
250272 AttributeKey (" db.query.parameter" )
251273
274+ /** Low cardinality representation of a database query text. <p>
275+ * @note
276+ * <p> `db.query.summary` provides static summary of the query text. It describes a class of database queries and
277+ * is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries.
278+ * Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not
279+ * available, instrumentations that support query parsing SHOULD generate a summary following <a
280+ * href="../../docs/database/database-spans.md#generating-a-summary-of-the-query-text">Generating query summary</a>
281+ * section. This attribute has stability level RELEASE CANDIDATE.
282+ */
283+ val DbQuerySummary : AttributeKey [String ] =
284+ AttributeKey (" db.query.summary" )
285+
252286 /** The database query being executed. <p>
253287 * @note
254288 * <p> For sanitization see <a
@@ -269,6 +303,11 @@ object DbExperimentalAttributes {
269303 val DbRedisDatabaseIndex : AttributeKey [Long ] =
270304 AttributeKey (" db.redis.database_index" )
271305
306+ /** Number of rows returned by the operation.
307+ */
308+ val DbResponseReturnedRows : AttributeKey [Long ] =
309+ AttributeKey (" db.response.returned_rows" )
310+
272311 /** Database response status code. <p>
273312 * @note
274313 * <p> The status code returned by the database. Usually it represents an error code, but may also represent
@@ -391,7 +430,7 @@ object DbExperimentalAttributes {
391430 abstract class DbCosmosdbConnectionModeValue (val value : String )
392431 object DbCosmosdbConnectionModeValue {
393432
394- /** Gateway (HTTP) connections mode
433+ /** Gateway (HTTP) connection.
395434 */
396435 case object Gateway extends DbCosmosdbConnectionModeValue (" gateway" )
397436
@@ -400,9 +439,37 @@ object DbExperimentalAttributes {
400439 case object Direct extends DbCosmosdbConnectionModeValue (" direct" )
401440 }
402441
442+ /** Values for [[DbCosmosdbConsistencyLevel ]].
443+ */
444+ abstract class DbCosmosdbConsistencyLevelValue (val value : String )
445+ object DbCosmosdbConsistencyLevelValue {
446+
447+ /** strong.
448+ */
449+ case object Strong extends DbCosmosdbConsistencyLevelValue (" Strong" )
450+
451+ /** bounded_staleness.
452+ */
453+ case object BoundedStaleness extends DbCosmosdbConsistencyLevelValue (" BoundedStaleness" )
454+
455+ /** session.
456+ */
457+ case object Session extends DbCosmosdbConsistencyLevelValue (" Session" )
458+
459+ /** eventual.
460+ */
461+ case object Eventual extends DbCosmosdbConsistencyLevelValue (" Eventual" )
462+
463+ /** consistent_prefix.
464+ */
465+ case object ConsistentPrefix extends DbCosmosdbConsistencyLevelValue (" ConsistentPrefix" )
466+ }
467+
403468 /** Values for [[DbCosmosdbOperationType ]].
404469 */
470+ @ deprecated(" No replacement at this time." , " " )
405471 abstract class DbCosmosdbOperationTypeValue (val value : String )
472+ @ annotation.nowarn(" cat=deprecation" )
406473 object DbCosmosdbOperationTypeValue {
407474
408475 /** batch.
0 commit comments