Skip to content

[receiver/sqlserver] Remove warning on resource attributes #38831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 20, 2025

Conversation

crobert-1
Copy link
Member

@crobert-1 crobert-1 commented Mar 20, 2025

Description

The server.address and server.port resource attributes in the SQL Server receiver had warnings that they will be enabled by default in a future release. These resource attributes are being set by simply passing through config option values. The config options, server and port, are optional. Also, the SQL Server receiver supports scraping Windows Performance counters for metrics, which render these resource attributes meaningless. For these reasons, the resource attributes should continue to be disabled by default.

There may be some way to get these resource attributes from windows perf counters, but that is a separate work item that would be required before enabling. If that work gets done at some point we can revisit enabling these by default.

Related: #35183

@crobert-1 crobert-1 requested a review from a team as a code owner March 20, 2025 17:29
@crobert-1 crobert-1 requested a review from dehaansa March 20, 2025 17:29
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but are we enabling those attributes then?

@crobert-1 crobert-1 force-pushed the remove_resourceattrs_warning branch from 2401522 to 5a898b9 Compare March 20, 2025 17:52
@crobert-1
Copy link
Member Author

crobert-1 commented Mar 20, 2025

LGTM, but are we enabling those attributes then?

I've clarified in the changelog notes. This does not change any functional behavior of the receiver. The resource attributes were disabled before this change, and will continue to be. This is only removing the warning 👍

I figured including a changelog may be helpful as users may wonder why they're not getting a warning message anymore, or if the resource attributes are actually enabled by default as the warning told them they would be.

@atoulme atoulme marked this pull request as draft March 20, 2025 18:08
@atoulme atoulme marked this pull request as ready for review March 20, 2025 18:08
@atoulme atoulme added the ready to merge Code review completed; ready to merge by maintainers label Mar 20, 2025
@atoulme atoulme merged commit 270c86c into open-telemetry:main Mar 20, 2025
181 of 183 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 20, 2025
atoulme pushed a commit that referenced this pull request Mar 21, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
We removed 2 warnings in #38831 , and this PR updates corresponding test
on Windows.

cc @atoulme @crobert-1 
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #38842 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated

<!--Describe the documentation added.-->
#### Documentation
n/a

<!--Please delete paragraphs that you did not use before submitting.-->
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…metry#38831)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
The `server.address` and `server.port` resource attributes in the SQL
Server receiver had warnings that they will be enabled by default in a
future release. These resource attributes are being set by simply
passing through config option values. The config options, `server` and
`port`, are optional. Also, the SQL Server receiver supports scraping
Windows Performance counters for metrics, which render these resource
attributes meaningless. For these reasons, the resource attributes
should continue to be disabled by default.

There may be some way to get these resource attributes from windows perf
counters, but that is a separate work item that would be required before
enabling. If that work gets done at some point we can revisit enabling
these by default.

Related:
open-telemetry#35183

---------

Co-authored-by: Antoine Toulme <[email protected]>
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
We removed 2 warnings in open-telemetry#38831 , and this PR updates corresponding test
on Windows.

cc @atoulme @crobert-1 
<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38842 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated

<!--Describe the documentation added.-->
#### Documentation
n/a

<!--Please delete paragraphs that you did not use before submitting.-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers receiver/sqlserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants