[sqlserverreceiver] Enrich db.server.query_sample with blocking and resource attributes#47259
Draft
splunk-shanu wants to merge 4 commits intoopen-telemetry:mainfrom
Draft
Conversation
…-fields' into feat/sqlserver-query-sample-lock-fields
| description: SQL Server identifier for the locked or waited-on resource, if available. | ||
| type: string | ||
| requirement_level: recommended | ||
| sqlserver.resource_type: |
Contributor
There was a problem hiding this comment.
Suggested change
| sqlserver.resource_type: | |
| sqlserver.resource.type: |
| description: Status of the request (e.g., running, suspended). | ||
| type: string | ||
| requirement_level: recommended | ||
| sqlserver.resource_id: |
Contributor
There was a problem hiding this comment.
Suggested change
| sqlserver.resource_id: | |
| sqlserver.resource.id: |
Comment on lines
+344
to
+345
| - sqlserver.resource_id | ||
| - sqlserver.resource_type |
Contributor
There was a problem hiding this comment.
U
Suggested change
| - sqlserver.resource_id | |
| - sqlserver.resource_type | |
| - sqlserver.resource.id | |
| - sqlserver.resource.type |
| description: Session ID that is blocking the current session. 0 if none. | ||
| type: int | ||
| requirement_level: recommended | ||
| sqlserver.blocking_start_time: |
Contributor
There was a problem hiding this comment.
Suggested change
| sqlserver.blocking_start_time: | |
| sqlserver.blocking.start_time: |
| - network.peer.address | ||
| - network.peer.port | ||
| - sqlserver.blocking_session_id | ||
| - sqlserver.blocking_start_time |
Contributor
There was a problem hiding this comment.
Suggested change
| - sqlserver.blocking_start_time | |
| - sqlserver.blocking.start_time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
sqlserver.blocking_start_time,sqlserver.resource_id, andsqlserver.resource_typetodb.server.query_sampleinreceiver/sqlserverreceiver.This change enriches existing active request rows collected by the SQL Server receiver with:
The change updates:
metadata.yamltemplates/sqlServerQuerySample.tmplscraper.goIt also ensures
sqlserver.blocking_start_timeis only populated whensqlserver.blocking_session_id > 0, so we do not report a blocking start time when there is no blocking session.Link to tracking issue
Fixes #47119
Testing
Ran targeted and full receiver tests from
receiver/sqlserverreceiver:go test ./... -run 'TestGetSQLServerQuerySamplesQuery|TestRecordDatabaseSampleQuery' -vgo test ./...Also validated the custom collector build path:
make otelcontribcolDocumentation
Updated generated receiver documentation to include:
sqlserver.blocking_start_timesqlserver.resource_idsqlserver.resource_typeRegenerated metadata-derived files and refreshed query/golden testdata accordingly.