Skip to content
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

[SQL receivers] Remove duplicate SQL functionality #13546

Closed
crobert-1 opened this issue Aug 23, 2022 · 5 comments
Closed

[SQL receivers] Remove duplicate SQL functionality #13546

crobert-1 opened this issue Aug 23, 2022 · 5 comments
Assignees
Labels

Comments

@crobert-1
Copy link
Member

Is your feature request related to a problem? Please describe.
We are starting to run into having logic duplicated in a few places with SQL receivers. The receivers in question are:

sqlqueryrecevier
mysqlreceiver
postgresqlreceiver

All three of these receivers are used to create database connections, and then use queries to return data in the form of metrics.

Describe the solution you'd like
The sqlqueryreceiver is the generic form of this functionality, and can be used to connect to any supported database technology. The only pre-requisite is to be able to import the proper driver, which will be a requirement no matter what since drivers are required to establish a database connection from the collector.

Since the sqlquery receiver can be used as the standard connector to databases without the explicit need for each database technology to have its own receiver, I believe we should use it as the main receiver for sql query metrics.

Describe alternatives you've considered
The alternative is to create new receivers for each database technology. This can help user experience so that users can find what they're looking for faster ("I want to query mysql for metrics, I need the mysql receiver"), but in the end results in lots of duplicated code and logic. Duplicated code and logic means any development changes will take longer, and will be harder to maintain. If we document functionality properly, we shouldn't have to worry as much about things being hard to find.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2022

Pinging code owners: @dmitryax @pmcollins. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@evan-bradley evan-bradley added the priority:p2 Medium label Sep 9, 2022
@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Nov 10, 2022
@github-actions
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2023
@crobert-1 crobert-1 reopened this Jan 11, 2024
@crobert-1 crobert-1 self-assigned this Jan 11, 2024
dmitryax pushed a commit that referenced this issue Feb 2, 2024
…30709)

**Description:** 
As noted in the related issues, a lot of the logic in the sqlquery
receiver can be moved to a central package to be used by other
receivers. I realize this appears to be a large change, but it's purely
a re-organization PR, there's no functional changes. GitHub is not
recognizing moved files, so please refer to new file names and their
deleted counterparts. A lot of members are now public in the internal
package that were private in the receiver which is likely what's causing
GitHub to miss that they're just moved files.

This doesn't require a changelog (in my mind) because all things moving
were originally private to the receiver. They're now still purely
internal, so they won't be published.

I believe `internal` is the best destination for now as it allows us to
solidify the usage and interface before moving it to `pkg` to be
publicly available. There are still a lot of unknowns as far as how it
can be used by other receivers, so I fully expect "breaking changes" to
this. If we keep it internal we can update all usages with the changing
interface, so the changes won't be breaking.

**Link to tracking Issue:** 
#30297, #13546
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Mar 12, 2024
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants