{"source":"semconv","version":"1.44.0","attribute":{"id":"db.query.summary","type":"string","stability":"stable","brief":"Low cardinality summary of a database query.","note":"The query summary describes a class of database queries and is useful\nas a grouping key, especially when analyzing telemetry for database\ncalls involving complex queries.\n\nSummary may be available to the instrumentation through\ninstrumentation hooks or other means. If it is not available, instrumentations\nthat support query parsing SHOULD generate a summary following\n[Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query)\nsection.\n\nFor batch operations, if the individual operations are known to have the same query summary\nthen that query summary SHOULD be used prepended by `BATCH `,\notherwise `db.query.summary` SHOULD be `BATCH` or some other database\nsystem specific term if more applicable.","examples":["SELECT wuser_table","INSERT shipping_details SELECT orders","get user by id"],"namespace":"db","definedIn":"model/db/registry.yaml","usedBy":[{"groupId":"attributes.db.client.with_query","groupType":"attribute_group","requirementLevel":"recommended"},{"groupId":"attributes.db.client.with_query_and_collection","groupType":"attribute_group","requirementLevel":"recommended"},{"groupId":"metric.db.client.operation.duration","groupType":"metric","signalName":"db.client.operation.duration","requirementLevel":"recommended"},{"groupId":"metric.db.client.response.returned_rows","groupType":"metric","signalName":"db.client.response.returned_rows","requirementLevel":"recommended"},{"groupId":"span.db.cassandra.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"span.db.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"span.db.mariadb.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"span.db.mysql.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"span.db.oracledb.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"span.db.postgresql.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"span.db.sql_server.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"span.db.sql.client","groupType":"span","requirementLevel":"recommended"},{"groupId":"trace.db.common.full","groupType":"attribute_group","requirementLevel":"recommended"},{"groupId":"trace.db.common.query","groupType":"attribute_group","requirementLevel":"recommended"},{"groupId":"trace.db.common.query_and_collection","groupType":"attribute_group","requirementLevel":"recommended"}]},"history":[{"version":"1.30.0","publishedAt":"2025-01-24T19:11:42Z","kind":"first-seen","detail":"Already present at v1.30.0, the oldest release tracked here (release_candidate)."},{"version":"1.33.0","publishedAt":"2025-05-02T19:48:40Z","kind":"stability-changed","detail":"Promoted to stable.","severity":"notable"}],"replaces":[]}