| Attributes | Description | Type |
|---|---|---|
| sqlserver.total_elapsed_time | Total elapsed time, reported in second, for completed executions of this plan. This will only report the incremented value. For instance, if the previously observed value is 1000 second, and this time we got 1020 second, we will report 20 second instead of 1020. |
float |
| sqlserver.total_rows | Total number of rows returned by the query. Can't be null. Always 0 when a natively compiled stored procedure queries a memory-optimized table. This will only report the incremented value. For instance, if the previously observed value is 1000, and this time we got 1020, we will report 20 instead of 1020. |
int |
| sqlserver.total_worker_time | Total amount of CPU time, reported in seconds, that was consumed by executions of this plan since it was compiled. For natively compiled stored procedures, total_worker_time might not be accurate if many executions take less than 1 millisecond. This will only report the incremented value. For instance, if the previously observed value is 1000 second, and this time we got 1020 second, we will report 20 second instead of 1020. |
float |
| sqlserver.total_logical_reads | Total number of logical reads performed by executions of this plan since it was compiled. Always 0 when querying a memory-optimized table. This will only report the incremented value. For instance, if the previously observed value is 1000, and this time we got 1020, we will report 20 instead of 1020. |
int |
| sqlserver.total_logical_writes | Total number of logical writes performed by executions of this plan since it was compiled. Always 0 when querying a memory-optimized table. This will only report the incremented value. For instance, if the previously observed value is 1000, and this time we got 1020, we will report 20 instead of 1020. |
int |
| sqlserver.total_physical_reads | Total number of physical reads performed by executions of this plan since it was compiled. Always 0 when querying a memory-optimized table. This will only report the incremented value. For instance, if the previously observed value is 1000, and this time we got 1020, we will report 20 instead of 1020. This will only report the incremented value. For instance, if the previously observed value is 1000, and this time we got 1020, we will report 20 instead of 1020. |
int |
| sqlserver.execution_count | Number of times that the plan has been executed since it was last compiled. This will only report the incremented value. For instance, if the previously observed value is 1000, and this time we got 1020, we will report 20 instead of 1020. |
int |
| sqlserver.total_grant_kb | The total amount of reserved memory grant in KB this plan received since it was compiled. Always 0 for querying a memory-optimized table. Applies to: SQL Server 2016 (13.x) and later versions. This will only report the incremented value. For instance, if the previously observed value is 1000, and this time we got 1020, we will report 20 instead of 1020. |
int |
| sqlserver.query_hash | Hex encoded hash value calculated on the query and used to identify queries with similar logic. You can use the query hash to determine the aggregate resource usage for queries that differ only by literal values. | string |
| sqlserver.query_plan_hash | Hex encoded hash value calculated on the query execution plan and used to identify similar query execution plans. You can use query plan hash to find the cumulative cost of queries with similar execution plans. Always 0x000 when a natively compiled stored procedure queries a memory-optimized table. |
string |
| db.query.text | Obfuscated text of the SQL query. Is NULL for encrypted objects. This one is defined in Opentelemetry Semantic Convention, so we are using the naming following the convention. https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/db.md |
string |
| sqlserver.query_plan | Obfuscated query plan | string |
| Attributes | Description | Type |
|---|---|---|
| db.system.name | The database system name. It will always be microsoft.sql_server | string |
| db.namespace | The database name. | string |
| network.peer.address | IP address of the peer client. | string |
| network.peer.port | TCP port used by the peer client. | int |
| client.port | TCP port used by the client. | int |
| client.address | Hostname or address of the client. | string |
| sqlserver.query_start | Timestamp of when the SQL query started (ISO 8601 format). | string |
| sqlserver.session_id | ID of the SQL Server session. | int |
| sqlserver.session_status | Status of the session (e.g., running, sleeping). | string |
| sqlserver.request_status | Status of the request (e.g., running, suspended). | string |
| sqlserver.command | SQL command type being executed. | string |
| db.query.text | Obfuscated SQL text of the query being executed. | string |
| sqlserver.blocking_session_id | Session ID that is blocking the current session. 0 if none. | int |
| sqlserver.wait_type | Type of wait encountered by the request. Empty if none. | string |
| sqlserver.wait_time | Duration in seconds the request has been waiting. | float |
| sqlserver.wait_resource | The resource for which the session is waiting. | string |
| sqlserver.open_transaction_count | Number of transactions currently open in the session. | int |
| sqlserver.transaction_id | Unique ID of the active transaction. | int |
| sqlserver.percent_complete | Percentage of work completed | float |
| sqlserver.estimated_completion_time | Estimated time remaining for the request to complete, in seconds. | float |
| sqlserver.cpu_time | CPU time consumed by the query, in seconds. | float |
| sqlserver.total_elapsed_time | Total time the request has been running, in seconds. | float |
| sqlserver.reads | Number of physical reads performed by the query. | int |
| sqlserver.writes | Number of writes performed by the query. | int |
| sqlserver.logical_reads | Number of logical reads (data read from cache/memory). | int |
| sqlserver.transaction_isolation_level | Transaction isolation level used in the session. Represented as numeric constant. | int |
| sqlserver.lock_timeout | Lock timeout value in seconds. | float |
| sqlserver.deadlock_priority | Deadlock priority value for the session. | int |
| sqlserver.row_count | Number of rows affected or returned by the query. | int |
| sqlserver.query_hash | Hash value used to group queries with similar structure. | string |
| sqlserver.query_plan_hash | Hash value used to group similar query execution plans. | string |
| sqlserver.context_info | Optional context information for the query/session. | string |
| sqlserver.username | Login name associated with the SQL Server session. | string |