groups: - id: attributes.db.client.minimal type: attribute_group brief: 'Database Client attributes' attributes: - ref: server.address brief: > Name of the database host. - ref: server.port requirement_level: conditionally_required: If using a port other than the default port for this DBMS and if `server.address` is set. - ref: db.response.status_code requirement_level: conditionally_required: If the operation failed and status code is available. - ref: error.type requirement_level: conditionally_required: If and only if the operation failed. note: > The `error.type` SHOULD match the `db.response.status_code` returned by the database or the client library, or the canonical name of exception that occurred. When using canonical exception type name, instrumentation SHOULD do the best effort to report the most relevant type. For example, if the original exception is wrapped into a generic one, the original exception SHOULD be preferred. Instrumentations SHOULD document how `error.type` is populated. - id: attributes.azure.cosmosdb.minimal type: attribute_group brief: 'Azure Cosmos DB Client attributes' stability: development extends: attributes.db.client.minimal attributes: # TODO: add db.system.name once https://github.com/open-telemetry/weaver/issues/479 is possible # - ref: db.system.name # requirement_level: # conditionally_required: if available - ref: db.operation.name requirement_level: required - ref: db.collection.name brief: Cosmos DB container name. requirement_level: conditionally_required: If available. - ref: db.namespace requirement_level: conditionally_required: If available. note: "" # overriding the base note - ref: azure.cosmosdb.response.sub_status_code requirement_level: conditionally_required: when response was received and contained sub-code. - ref: azure.cosmosdb.consistency.level requirement_level: conditionally_required: If available. - id: attributes.db.client.with_query extends: attributes.db.client.minimal type: attribute_group brief: This group defines the attributes describing database operations that may have queries. attributes: - ref: db.query.text - ref: db.query.summary requirement_level: recommended: if available through instrumentation hooks or if the instrumentation supports generating a query summary. - id: attributes.db.client.with_query_and_collection extends: attributes.db.client.with_query type: attribute_group brief: This group defines the attributes describing database operations that have operation name, collection name and query. attributes: - ref: db.operation.name requirement_level: conditionally_required: > If readily available and if there is a single operation name that describes the database call. - ref: db.collection.name requirement_level: conditionally_required: > If readily available and if a database call is performed on a single collection.