clickhouse-java
clickhouse-java copied to clipboard
Make User-Agent to be filled correctly
Describe the bug
ClickHouse Java Client is used by many connectors and products providing integration with ClickHouse. When such client within application is contacting a server such client send User-Agent
header where very important information is packed. Part of this information is used for analytics and making decisions.
Current implementation is may be not strict enough in this part because we do see strings like:
metabase/1.3.3/unknown (Linux/6.1.0-12-amd64; OpenJDK 64-Bit Server VM/Temurin-11.0.22+7; HttpURLConnection; rv:unknown)
And there is no 100% guarantee that some integration used expected JDBC driver. What is more difficult is to match integration version with expected java client version and all its core components (for example, was Apache or HttpURLConnection used).
Expected behaviour
Whatever integration is used, what ever User-Agent
header is passed there should be information from java client.
Look https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent for reference.