[exporter/clickhouse] Add client info for identifying exporter in system.query_log#34915
[exporter/clickhouse] Add client info for identifying exporter in system.query_log#34915SpencerTorres wants to merge 18 commits into
system.query_log#34915Conversation
|
@dmitryax @crobert-1 I don't have perms to add the label, but this is ready to merge |
|
Looks like my local tests were running differently, I cannot seem to figure out what SQL driver registration magic is happening, but it is all dependent on this line: // exporter_logs.go:213
var driverName = "clickhouse" // for testingI will investigate further and then update. This seems to only occur for the unit tests, not for integration tests |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
not stale |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
still active |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Updating the solution now, not stale. Found a way to avoid breaking the entire SQL driver |
590df1e to
c7f424d
Compare
|
@Frapschen @hanjm Fixed with a simplified solution, let me know if this looks good. Thanks! |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
not stale, ready for review |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
|
not stale, will reopen |
…stem.query_log` (#37146) **Description:** (reopen from #34915) This change will include information about the collector version and OS/Arch for every `INSERT`. Users can then track the origin of these queries in `system.query_log`. For an official build this will look something like `otelcol/v0.114.0`. This is implemented by setting `client_info_product` in the DSN. The underlying ClickHouse Go driver will then attach it upon connection. Users can already add their own version info in `endpoint` or `connection_params`, but this change will now safely set or append to that value with the binary's information. **Documentation:** - Added notes to README for `client_product_info` **Testing:** - Add/updated unit tests
Description:
This change will include information about the collector version and OS/Arch for every
INSERT. Users can then track the origin of these queries insystem.query_log. For an official build this will look something likeotelcol/v0.114.0-lin-amd64.This is implemented by setting
client_info_productin the DSN. The underlying ClickHouse Go driver will then attach it upon connection. Users can already add their own version info inendpointorconnection_params, but this change will now safely set or append to that value with the binary's information.Documentation:
client_product_infoTesting: