|
78 | 78 | """ |
79 | 79 | The name of a collection (table, container) within the database. |
80 | 80 | Note: It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. |
81 | | -If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. |
82 | | -For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. |
| 81 | +
|
| 82 | +The collection name SHOULD NOT be extracted from `db.query.text`, |
| 83 | +unless the query format is known to only ever have a single collection name present. |
| 84 | +
|
| 85 | +For batch operations, if the individual operations are known to have the same collection name |
| 86 | +then that collection name SHOULD be used. |
| 87 | +
|
83 | 88 | This attribute has stability level RELEASE CANDIDATE. |
84 | 89 | """ |
85 | 90 |
|
|
98 | 103 | Cosmos client connection mode. |
99 | 104 | """ |
100 | 105 |
|
| 106 | +DB_COSMOSDB_CONSISTENCY_LEVEL: Final = "db.cosmosdb.consistency_level" |
| 107 | +""" |
| 108 | +Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). |
| 109 | +""" |
| 110 | + |
101 | 111 | DB_COSMOSDB_CONTAINER: Final = "db.cosmosdb.container" |
102 | 112 | """ |
103 | 113 | Deprecated: Replaced by `db.collection.name`. |
104 | 114 | """ |
105 | 115 |
|
106 | 116 | DB_COSMOSDB_OPERATION_TYPE: Final = "db.cosmosdb.operation_type" |
107 | 117 | """ |
108 | | -Cosmos DB Operation Type. |
| 118 | +Deprecated: No replacement at this time. |
| 119 | +""" |
| 120 | + |
| 121 | +DB_COSMOSDB_REGIONS_CONTACTED: Final = "db.cosmosdb.regions_contacted" |
| 122 | +""" |
| 123 | +List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. |
| 124 | +Note: Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location). |
109 | 125 | """ |
110 | 126 |
|
111 | 127 | DB_COSMOSDB_REQUEST_CHARGE: Final = "db.cosmosdb.request_charge" |
112 | 128 | """ |
113 | | -RU consumed for that operation. |
| 129 | +Request units consumed for the operation. |
114 | 130 | """ |
115 | 131 |
|
116 | 132 | DB_COSMOSDB_REQUEST_CONTENT_LENGTH: Final = ( |
|
195 | 211 | DB_OPERATION_NAME: Final = "db.operation.name" |
196 | 212 | """ |
197 | 213 | The name of the operation or command being executed. |
198 | | -Note: It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. |
199 | | -If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. |
200 | | -For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. |
| 214 | +Note: It is RECOMMENDED to capture the value as provided by the application |
| 215 | +without attempting to do any case normalization. |
| 216 | +
|
| 217 | +The operation name SHOULD NOT be extracted from `db.query.text`, |
| 218 | +unless the query format is known to only ever have a single operation name present. |
| 219 | +
|
| 220 | +For batch operations, if the individual operations are known to have the same operation name |
| 221 | +then that operation name SHOULD be used prepended by `BATCH `, |
| 222 | +otherwise `db.operation.name` SHOULD be `BATCH` or some other database |
| 223 | +system specific term if more applicable. |
| 224 | +
|
| 225 | +This attribute has stability level RELEASE CANDIDATE. |
| 226 | +""" |
| 227 | + |
| 228 | +DB_OPERATION_PARAMETER_TEMPLATE: Final = "db.operation.parameter" |
| 229 | +""" |
| 230 | +A database operation parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value. |
| 231 | +Note: If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index. |
| 232 | +If `db.query.text` is also captured, then `db.operation.parameter.<key>` SHOULD match up with the parameterized placeholders present in `db.query.text`. |
201 | 233 | This attribute has stability level RELEASE CANDIDATE. |
202 | 234 | """ |
203 | 235 |
|
204 | 236 | DB_QUERY_PARAMETER_TEMPLATE: Final = "db.query.parameter" |
205 | 237 | """ |
206 | | -A query parameter used in `db.query.text`, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value. |
207 | | -Note: Query parameters should only be captured when `db.query.text` is parameterized with placeholders. |
208 | | -If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index. |
| 238 | +Deprecated: Replaced by `db.operation.parameter`. |
| 239 | +""" |
| 240 | + |
| 241 | +DB_QUERY_SUMMARY: Final = "db.query.summary" |
| 242 | +""" |
| 243 | +Low cardinality representation of a database query text. |
| 244 | +Note: `db.query.summary` provides static summary of the query text. It describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries. |
| 245 | +Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-query-text) section. |
209 | 246 | This attribute has stability level RELEASE CANDIDATE. |
210 | 247 | """ |
211 | 248 |
|
|
223 | 260 | Deprecated: Replaced by `db.namespace`. |
224 | 261 | """ |
225 | 262 |
|
| 263 | +DB_RESPONSE_RETURNED_ROWS: Final = "db.response.returned_rows" |
| 264 | +""" |
| 265 | +Number of rows returned by the operation. |
| 266 | +""" |
| 267 | + |
226 | 268 | DB_RESPONSE_STATUS_CODE: Final = "db.response.status_code" |
227 | 269 | """ |
228 | 270 | Database response status code. |
@@ -298,11 +340,27 @@ class DbClientConnectionsStateValues(Enum): |
298 | 340 |
|
299 | 341 | class DbCosmosdbConnectionModeValues(Enum): |
300 | 342 | GATEWAY = "gateway" |
301 | | - """Gateway (HTTP) connections mode.""" |
| 343 | + """Gateway (HTTP) connection.""" |
302 | 344 | DIRECT = "direct" |
303 | 345 | """Direct connection.""" |
304 | 346 |
|
305 | 347 |
|
| 348 | +class DbCosmosdbConsistencyLevelValues(Enum): |
| 349 | + STRONG = "Strong" |
| 350 | + """strong.""" |
| 351 | + BOUNDED_STALENESS = "BoundedStaleness" |
| 352 | + """bounded_staleness.""" |
| 353 | + SESSION = "Session" |
| 354 | + """session.""" |
| 355 | + EVENTUAL = "Eventual" |
| 356 | + """eventual.""" |
| 357 | + CONSISTENT_PREFIX = "ConsistentPrefix" |
| 358 | + """consistent_prefix.""" |
| 359 | + |
| 360 | + |
| 361 | +@deprecated( |
| 362 | + reason="The attribute db.cosmosdb.operation_type is deprecated - No replacement at this time" |
| 363 | +) # type: ignore |
306 | 364 | class DbCosmosdbOperationTypeValues(Enum): |
307 | 365 | BATCH = "batch" |
308 | 366 | """batch.""" |
|
0 commit comments