Open Talbalash-legit opened 3 months ago
Pinging code owners:
receiver/sqlquery: @dmitryax @crobert-1
See Adding Labels via Comments if you do not have permissions to add labels yourself.
The datasource
string is passed directly to the sql.Open
function call without parsing any information. This means if we want a datasource string to be handled in a specific way, the issue should really be filed against the SQL driver itself. I don't think this receiver should try to parse datasource
strings in some meaningful way and then modify functionality depending on the result. I worry that would end up being too hard to maintain and would in itself be hard for users to understand.
I agree this is painful, but I'm not seeing a good way to handle this. A PR would be welcome though if you're interested in contributing, for us to be able to see the end complexity of this.
The
datasource
string is passed directly to thesql.Open
function call without parsing any information. This means if we want a datasource string to be handled in a specific way, the issue should really be filed against the SQL driver itself. I don't think this receiver should try to parsedatasource
strings in some meaningful way and then modify functionality depending on the result. I worry that would end up being too hard to maintain and would in itself be hard for users to understand.I agree this is painful, but I'm not seeing a good way to handle this. A PR would be welcome though if you're interested in contributing, for us to be able to see the end complexity of this.
Thanks for the answer! maybe can you consider allowing an array of datasource strings?
I thought a bit about this. It's not entirely off the table, it's just going to be a breaking change if we do that. I'm not aware if a more simple way to handle this though.
I thought a bit about this. It's not entirely off the table, it's just going to be a breaking change if we do that. I'm not aware if a more simple way to handle this though.
It would be great to at least set an array of databases per host with the same query. Otherwise, I'll need to duplicate the entire logic and queries for each host and database combination, which can be a lot - specially in a production environment.
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.
Hey @dmitryax . Have you had any further thoughts on how we might approach this, or have you come across any simpler alternatives since we last discussed it?
Component(s)
receiver/sqlquery
Is your feature request related to a problem? Please describe.
Currently, executing the same query across multiple database (e.g., several DBs on an AWS RDS cluster) requires duplicating the query for each instance. This leads to redundancy and increased maintenance overhead, as any change to the query must be replicated across all instances manually.
If i have 17 DBs in a cluster i will need to replicate the query configuration 17 times with the current solution. How can it be achieved today? maybe i'm missing something
Describe the solution you'd like
I would like the SQLQuery Receiver to support executing a single query across multiple database instances. This could be achieved by allowing users to specify a list of database connections within a single configuration, so that the query is executed against each instance automatically. This feature would streamline the process and reduce the need for query duplication.
The current situation is:
I would propose the following:
In this configuration, $$DB_NAME would be dynamically replaced with the actual database name for each datasource during query execution.
Describe alternatives you've considered
Additional context
No response