Skip to content

Commit 1260979

Browse files
authored
[chore][receiver/sqlserver] update to emit event via mdatagen generated method (#40276)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description now mdatagen can support event, we can emit event via this generated method <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.-->
1 parent 968b78c commit 1260979

File tree

9 files changed

+463
-291
lines changed

9 files changed

+463
-291
lines changed

receiver/sqlserverreceiver/documentation.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,48 @@ events:
533533
enabled: false
534534
```
535535
536+
### db.server.query_sample
537+
538+
query sample
539+
540+
#### Attributes
541+
542+
| Name | Description | Values |
543+
| ---- | ----------- | ------ |
544+
| client.address | Hostname or address of the client. | Any Str |
545+
| client.port | TCP port used by the client. | Any Int |
546+
| db.namespace | The database name. | Any Str |
547+
| db.query.text | The text of the database query being executed. | Any Str |
548+
| db.system.name | The database management system (DBMS) product as identified by the client instrumentation. | Any Str |
549+
| network.peer.address | IP address of the peer client. | Any Str |
550+
| network.peer.port | TCP port used by the peer client. | Any Int |
551+
| sqlserver.blocking_session_id | Session ID that is blocking the current session. 0 if none. | Any Int |
552+
| sqlserver.context_info | Context information for the session, represented as a hexadecimal string. | Any Str |
553+
| sqlserver.command | SQL command type being executed. | Any Str |
554+
| sqlserver.cpu_time | CPU time consumed by the query, in seconds. | Any Double |
555+
| sqlserver.deadlock_priority | Deadlock priority value for the session. | Any Int |
556+
| sqlserver.estimated_completion_time | Estimated time remaining for the request to complete, in seconds. | Any Double |
557+
| sqlserver.lock_timeout | Lock timeout value in seconds. | Any Double |
558+
| sqlserver.logical_reads | Number of logical reads (data read from cache/memory). | Any Int |
559+
| sqlserver.open_transaction_count | Number of transactions currently open in the session. | Any Int |
560+
| sqlserver.percent_complete | Percentage of work completed. | Any Double |
561+
| sqlserver.query_hash | Binary hash value calculated on the query and used to identify queries with similar logic, reported in the HEX format. | Any Str |
562+
| sqlserver.query_plan_hash | Binary hash value calculated on the query execution plan and used to identify similar query execution plans, reported in the HEX format. | Any Str |
563+
| sqlserver.query_start | Timestamp of when the SQL query started (ISO 8601 format). | Any Str |
564+
| sqlserver.reads | Number of physical reads performed by the query. | Any Int |
565+
| sqlserver.request_status | Status of the request (e.g., running, suspended). | Any Str |
566+
| sqlserver.row_count | Number of rows affected or returned by the query. | Any Int |
567+
| sqlserver.session_id | ID of the SQL Server session. | Any Int |
568+
| sqlserver.session_status | Status of the session (e.g., running, sleeping). | Any Str |
569+
| sqlserver.total_elapsed_time | Total elapsed time for completed executions of this plan, reported in delta seconds. | Any Double |
570+
| sqlserver.transaction_id | Unique ID of the active transaction. | Any Int |
571+
| sqlserver.transaction_isolation_level | Transaction isolation level used in the session. Represented as numeric constant. | Any Int |
572+
| sqlserver.wait_resource | The resource for which the session is waiting. | Any Str |
573+
| sqlserver.wait_time | Duration in seconds the request has been waiting. | Any Double |
574+
| sqlserver.wait_type | Type of wait encountered by the request. Empty if none. | Any Str |
575+
| sqlserver.writes | Number of writes performed by the query. | Any Int |
576+
| user.name | Login name associated with the SQL Server session. | Any Str |
577+
536578
### db.server.top_query
537579
538580
top query

receiver/sqlserverreceiver/internal/metadata/generated_config.go

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/sqlserverreceiver/internal/metadata/generated_logs.go

Lines changed: 76 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)