Skip to content

[SQL Server] expose server.port #35183

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

Closed
atoulme opened this issue Sep 13, 2024 · 8 comments
Closed

[SQL Server] expose server.port #35183

atoulme opened this issue Sep 13, 2024 · 8 comments
Assignees
Labels
Contribfest enhancement New feature or request help wanted Extra attention is needed receiver/sqlserver

Comments

@atoulme
Copy link
Contributor

atoulme commented Sep 13, 2024

Component(s)

receiver/sqlserver

Is your feature request related to a problem? Please describe.

Similar to #32810 we find that multiple SQL server instances running on the same host will be commingled.

Describe the solution you'd like

the SQL server receiver should expose a server.port attribute similar to what the mongodbreceiver is doing.

Describe alternatives you've considered

No response

Additional context

No response

@atoulme atoulme added enhancement New feature or request needs triage New item requiring triage labels Sep 13, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@atoulme
Copy link
Contributor Author

atoulme commented Sep 13, 2024

The metadata.yaml would be enhanced with

  server.address:
    description: The address of the SQL server host.
    enabled: true
    type: string
  server.port:
    description: The port of the SQL server host.
    enabled: false
    type: int

@atoulme atoulme added help wanted Extra attention is needed and removed needs triage New item requiring triage labels Oct 2, 2024
@LZiHaN
Copy link
Member

LZiHaN commented Dec 13, 2024

hi, is this task still available? I’d like to give it a try, assign please

@atoulme
Copy link
Contributor Author

atoulme commented Dec 18, 2024

@LZiHaN all yours!

@LZiHaN
Copy link
Member

LZiHaN commented Jan 3, 2025

Hi @atoulme , it looks like multiple SQL Server instances on the same host can get mixed up.
Do other receivers like

  • receiver/mysqlreceiver
  • receiver/oracledbreceiver
  • receiver/postgresqlreceiver
  • receiver/rabbitmqreceiver
  • receiver/haproxyreceiver
  • receiver/saphanareceiver
  • ...

have the same issue? Should they be updated too?

@atoulme
Copy link
Contributor Author

atoulme commented Jan 3, 2025

I don’t know. I don’t think that’s missing for most.

MovieStoreGuy pushed a commit that referenced this issue Feb 20, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
The new attribute are added to the SQL server receiver to distinguish
metrics coming from different SQL server instances.

- **server.address**: The address of the SQL server host, enabled by
default.
- **server.port**: The port of the SQL server host, disabled by default.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
refer to #35183 

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

<!--Describe the documentation added.-->
#### Documentation
no need to update.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Ziqi Zhao <[email protected]>
Co-authored-by: Tyler Helmuth <[email protected]>
@LZiHaN
Copy link
Member

LZiHaN commented Feb 20, 2025

The PR has been merged, and the issue has been resolved. It can be closed now.

@djaglowski
Copy link
Member

Closed by #37004

atoulme added a commit that referenced this issue Mar 20, 2025
<!--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:
#35183

---------

Co-authored-by: Antoine Toulme <[email protected]>
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this issue 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribfest enhancement New feature or request help wanted Extra attention is needed receiver/sqlserver
Projects
None yet
Development

No branches or pull requests

3 participants