Repository navigation
Conversation
…s and ClickStack alerts Rebuild the ClickHouse plugin on a shared query layer and extend it to the other signals stored in ClickHouse. - Datasource: optional default database, queries sent with POST as read-only with bounded and unambiguous results, GET kept for the proxies that only allow it, health check. - Time series query: label columns split the rows into series, results without a time column are tables, OpenTelemetry histograms, exemplars, series name format and min step. - Log query: OpenTelemetry events and levels, volume of the logs. - New plugins: trace query, profile query, SQL variable, SQL annotation, explorer, ClickStack datasource and ClickStack alerts query. - Macros compatible with the ClickHouse datasource of Grafana and variable interpolation in every query. - CUE schemas, Go SDK and documentation for every kind, unit tests and an end-to-end spec. The Perses image of the e2e job is bumped: the previous one can not load the schemas of the current plugins. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Guillaume LADORME <gladorme@users.noreply.github.com>
Gladorme
requested review from
a team,
AntoineThebaud and
Nexucis
as code owners
November 26, 2026 16:49
Gladorme
marked this pull request as draft
November 26, 2026 16:49
- Readonly guard: only a ClickHouse 164/452 refusal confirmed by a readonly probe drops it, per credentials and for 5 minutes. - Send wait_end_of_query with the other settings so that its refusal is retried without it. - Detect truncation at exactly the row limit by asking for one more row. - Leave variables and macros in comments alone, and macros with arguments in strings. - Strip a FORMAT clause followed by a comment; ignore comments in the SELECT list. - Widen the date condition of $__dateTimeFilter by a day on each side. - Cap the grid of a single old point; keep every row of a table as its own series. - Show the series with a warning when their exemplars can not be read. - Refuse datasource variables in profile queries, with an editor alert. - Summarize traces from all their spans, without the 1-hour window. - Count a NULL log level as unknown in the volume query. - Tell in the datasource editor when the proxy does not allow the connection test. - Remove the oxlint suppression of the client. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Guillaume LADORME <gladorme@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Full ClickHouse support, as requested in perses/perses#4202. The plugin is rebuilt on a shared query layer and now covers every signal that the ClickHouse exporter of the OpenTelemetry Collector and ClickStack store: metrics, logs, traces and profiles, plus variables, annotations and the alerts of ClickStack.
Fixes #841
Fixes #842
Fixes #843
Plugins
ClickHouseDatasourcedatabase. Queries are sent withPOSTas read-only (readonly=2), with ISO date/times, quoted 64-bit integers and a limit of 100 000 rows. It adapts to users that can not change settings. The connection test callsGET /ping.ClickHouseTimeSeriesQueryexemplarQuery. New optionalseriesNameFormat,exemplarQueryandminStep.ClickHouseLogQueryClickHouseTraceQueryClickHouseProfileQueryotel_profiles.ClickHouseSQLVariableClickHouseSQLAnnotationClickHouseExplorerClickStackDatasource,ClickStackAlertsQueryEvery query gets macros compatible with the ClickHouse datasource of Grafana (
$__timeFilter,$__timeInterval,$__interval_s,$__conditionalAll…) and the dashboard variables, with asqlstringformat that writes values as ClickHouse string literals. The errors of ClickHouse are shown instead of an empty panel (#842).Each kind has its CUE schema with test fixtures, its Go SDK builder and its documentation, including a new "Writing queries" page with the column conventions and recipes checked on real data.
Compatibility
GETon the root path keep working: their queries are still sent withGET.FORMATclause is ignored, anddatabasestill defaults todefault.createClickHouseClient().query()now returns{ columns, rows, timeZone, truncated, statistics }and no longer takesstartandend.For the reviewer
.github/dev/docker-compose.ci.ymlmoves Perses frommain-2026-02-26-739dc289tomain-2026-11-26-4d10594e. The previous image can not load the current plugins: their schemas need CUEv0.17.1where it hasv0.15.4, and it does not know theAnnotationplugin kind. It then refuses to provision the datasource and the dashboard of the new ClickHouse spec.<signal>-queries.tslogic shared#397). The alerts were tested against a self-hosted ClickStack 2.47.0, not against the managed one.Validation
Against the OpenTelemetry Demo, with its collector writing to ClickStack 2.47.0 and, through the ClickHouse exporter, to a second database that includes eBPF profiles. Dashboards, editors, connection tests, the explorer and the log explorer were checked in a browser on Perses
main-2026-11-26-4d10594e. The client was also run against ClickHouse users withreadonly = 0,1and2and with constrained settings: writes are refused and results stay bounded.npm run lintmain)npm run format:checknpm run type-checknpm run testmake lint-pluginsmake test-schemas-pluginsmake checkformat-cuemake golangci-lintmake testmake checklicensemake checkdocsnpx playwright test --workers=1 src/testsine2e, against a local Persesmain-2026-11-26-4d10594estarted like the CI job with the built archivesScreenshots
The OpenTelemetry Demo read from ClickHouse and ClickStack: time series with exemplars and annotations, a table, a heat map of OpenTelemetry histograms, the alerts of ClickStack, traces and logs.
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes