github Altinity/clickhouse-grafana v3.6.0

one hour ago

3.6.0 (2026-11-17)

Enhancements:

  • add a full-range logs volume histogram for Explore → Logs: the datasource now implements Grafana's supplementary-query contract (LogsVolume), so Explore runs a separate server-side aggregate over the whole time range ($timeSeries buckets × log level, levels detected with multiSearchAny on the level/severity column, ORDER BY/LIMIT of the logs query are not applied) instead of building the histogram from the first LIMIT-ed rows and showing the "This datasource does not support full-range histograms" warning; queries without a configured timestamp column keep Grafana's old row-based histogram, queries without a level/severity column get a single count() series, fix #782
  • add per-field "Advanced logs fields" settings for logs queries: configure how complex ClickHouse columns (Map, Array, Tuple, JSON, Dynamic, Variant) are rendered in the Logs panel — expand (one label per nested key, with per-field depth 1–4/All for nested types; the default depth is 1, matching previous releases so upgrades do not change label shapes), single (whole value as one label), hide, or raw (appended to the message body); the modal shows a live tree preview built from a sample row, disables Save until something changes, supports reset to defaults and marks modified fields, related to #678
  • type-aware label accessors for logs: Map columns expand with bracket subscripts (col['key'], chained for nested maps), JSON/Tuple/Nested with dot paths (col.a.b), so every filter click produces valid ClickHouse SQL
  • make adhoc filters column/type-aware: introspect system.columns (cached per datasource) to keep dot-path keys (json.a.b, tuple.field, Nested attr.key) as column expressions of the current table, quote values by column type (e.g. Map(String, String) values are always quoted, numeric leaves stay unquoted) and emit ClickHouse array literals only for Array columns; falls back to the legacy behavior whenever introspection is unavailable
  • upgrade frontend to @grafana/data|ui|runtime 13.3.0 and refresh JS/Go dependencies (qs, dompurify, zod, handlebars, source-map-js, go.opentelemetry.io/otel/sdk 1.47.0, pillow 13.0.0 in testflows) to fix security alerts
  • raise unit test coverage: backend (Go) 56% -> 92%, frontend (Jest) 39% -> 92% — 663 frontend tests (was 310) and ~350 new Go cases, frontend coverage ratchet bumped in jest.config.js (stmts 32 -> 90, branches 31 -> 88, funcs 21 -> 80, lines 32 -> 90), #930
  • test infrastructure: bump testflows to 2.5.1 for Python 3.14 on ubuntu-26.04 runners, drop the host ffmpeg apt install in favor of opencv-python-headless, and stabilize flaky e2e tests (retry annotations screenshot compare on transient Grafana SQLITE_BUSY, wait for any dashboard link in the dashboards list, match the panel alert state icon as a link on Grafana 13.3)
  • preserve big-number precision for UInt64/Int64 above 2^53: output_format_json_quote_64bit_integers=1 is applied to logs queries only (no time series regression, see #832), adhoc array literals parse numbers with json.Number and format elements by the column's ELEMENT type — string-serialized UInt64 elements become bare numerics for Array(UInt64) columns, numeric-looking strings stay quoted for Array(String) columns

Fixes:

  • fix Logs panel labels being attributed to the wrong rows when an expand-mode Map/JSON value is empty for some rows
  • fix adhoc filter values being corrupted: trailing text after a JSON-array prefix is no longer swallowed into an array literal, the legacy passthrough for pre-quoted / IN-list values is restored, and fully-qualified keys addressed to other tables are dropped again even when their first segment collides with a column name
  • fix responses being paired with hidden/empty targets in mixed panels (wrong format/refId applied to the visible query)
  • fix column-type cache leaking between multiple ClickHouse datasources within one Grafana process
  • fix query results being rejected by Grafana SQL expressions / transformations — a result without a time column is now returned as a single table frame with columns in SELECT order (instead of one frame per column), and multi-series time results declare the timeseries-multi frame type, fix #820
  • fix ad-hoc filter application stripping commas from multi-value SQL IN lists during AST re-formatting, fix #941
  • fix numeric-looking ad-hoc filter values being emitted unquoted when the column type is unknown, fix #794
  • fix template variable dropdown rendering empty labels for options whose value is a JSON array/object, fix #781
  • fix follow-up issues with the 3.5.0 datasource-level data links: links attached to log rows are now carried through the "Show context" view, incomplete link configurations are skipped at apply time instead of breaking the panel, ClickHouse-target links inherit the source query's database / table / timestamp settings so $timeFilter and other macros expand as in the source query, and the data-link plumbing is typed instead of any, closes #432, closes #645, #904
  • fix query template variables failing entirely on Grafana >= 13.2 — templateSrv.replace() threw SceneObject root is not a DashboardScene when a query containing the $__dashboard macro ran from the variable editor modal; the macro is now dropped and the rest interpolated (safeTemplateReplace); also fix stale "Show generated SQL" output caused by out-of-order backend replace() responses, #935
  • add regression e2e coverage for XY chart visualization from table format results (#793); make the xy_chart docker init schema idempotent

What's Changed

New Contributors

Full Changelog: v3.5.0...v3.6.0

Don't miss a new clickhouse-grafana release

NewReleases is sending notifications on new releases.