Skip to content

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

Closed
@vadeg

Description

@vadeg

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions