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.
Look https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent for reference.
Does the language client spec do the trick?
@chernser let's also add metadata for v2 API
See: https://github.com/ClickHouse/clickhouse-java/blob/03fcfb179a066c9ed34a586ed3637d7da4b7383a/clickhouse-http-client/src/main/java/com/clickhouse/client/http/ClickHouseHttpConnection.java#L420
Updated format: MyCustomClient ClickHouse-JavaClient/0.6.3 (OpenJDK 64-Bit Server VM/Corretto-17.0.6.10.1; HttpURLConnection)