Repository navigation
client-web-1.24.0
·
29 commits
to main
since this release
New features
- OpenTelemetry: richer, more actionable spans (requested by Langfuse, #948). (#950)
- The
X-ClickHouse-Summaryheader is now parsed on the Web client and attached to the operation spans (query/command/exec/insert), including the outerclickhouse.queryspan. Previously the Web client did not parse the summary header at all. - Every key present in the summary header is recorded as
clickhouse.summary.<key>(the set is not hardcoded). This surfacestotal_rows_to_readandmemory_usage(peak query memory, in bytes; sent by newer servers), and picks up future server-side additions (e.g.real_time_microseconds) automatically. db.response.returned_rowsis now recorded for non-streaming result consumption too (json()onJSON/JSONObjectEachRow/ the other single-document JSON formats), not just row-streaming paths.- Added a
span_attributesfield to the per-request query params (query/command/exec/insert/ping). Use it to enrich the operation span with application-level context — e.g. mirroring the tags you also send via thelog_commentsetting (route, tenant, surface, etc.). Caller-provided attributes never override the client's owndb.*/server.*/clickhouse.*attributes. - Added a
dangerously_log_query_textclient option (defaultfalse). When enabled, the raw SQL statement is attached to spans as the OpenTelemetrydb.query.textattribute. The query text may contain sensitive literals, which is why it is off by default; boundquery_paramsvalues and credentials are never traced regardless of this setting.
- The
Bug fixes
- Fixed
Array(Date)/Array(Date32)query-parameter binding (and other temporal element types nested in arrays, tuples, and maps). A JSDateinside a container was serialized as a bare Unix timestamp (e.g.[1683244800]), which the server'sArray(Date)element parser rejects (CANNOT_PARSE_INPUT_ASSERTION_FAILED). Container-nestedDatevalues are now emitted as a quoted UTC date string (e.g.['2023-05-05']), the one encoding every temporal element type accepts. Note: aDateused insideArray(DateTime)/Array(DateTime64)is now bound at day precision (the time-of-day is dropped), since date-only is the only formArray(Date)accepts; scalarDate/DateTimebinding is unchanged. (#947) - Export the
QueryParamsWithFormat,ClickHouseSummary,WithClickHouseSummary,ResultJSONType,RowJSONTypeandPingParamstypes from@clickhouse/client-web. They are used in the signatures of the public API (query,ping, the result types), but could not be imported from the package root (#997). (#1024)