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

feature request: Expose "queryId" field from "ClickHouseHttpResponse" to "ClickHouseResponse" #1636

Open
vadeg opened this issue May 14, 2024 · 1 comment

Comments

@vadeg
Copy link

vadeg commented May 14, 2024

ClickHouseHttpResponse class contains the queryId field which is returned from HTTP response in the X-ClickHouse-Query-Id header. This field remains in the ClickHouseHttpResponse and it is not possible to retrieve it using API provided by library.

Would that be possible to make queryId available to library clients?

As an idea what if to add a new queryId field into the ClickHouseResponseSummary class which is accessible by library clients. Technically this could be done by:

  • Adding queryId field in the class
  • Pass queryId from ClickHouseHttpResponse to ClickHouseResponseSummary summary in this line.

The change seems safe and should not affect clients which uses older library versions.

Why do I need this?

I collect executed queries and some statistics on top in our internal system. This is needed by our product.

I am aware of query_log table in Clickhouse, but this table would not help me because it is hard to match queries.

I am aware that I can pass a custom queryId to ClickHouseRequest.

Configuration

Environment

  • Client version: 0.6.0
  • Language version:
  • OS: any

ClickHouse server

  • ClickHouse Server version:
  • ClickHouse Server non-default settings, if any: no
@vadeg vadeg added the bug label May 14, 2024
@chernser chernser added enhancement and removed bug labels May 15, 2024
@chernser
Copy link
Contributor

Good day, @vadeg!
Agreed, it can be done thru response object or summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants