Skip to content

Commit

Permalink
Merge branch 'main' into k8s-dashboards-rework
Browse files Browse the repository at this point in the history
  • Loading branch information
rnovikovP authored Feb 22, 2024
2 parents 97758d8 + 81d1dfc commit 701ac1a
Show file tree
Hide file tree
Showing 60 changed files with 36,434 additions and 25,406 deletions.
153 changes: 148 additions & 5 deletions panels/grafana-clickhouse-datasource/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,152 @@
# Changelog

## 4.0.2

### Fixes

- Fixed migration script not running when opening an existing v3 config

## 4.0.1

### Fixes

- Set `protocol` to `native` by default in config view. Fixes the "default port" description.

## 4.0.0

### Features

Version 4.0.0 contains major revisions to the query builder and datasource configuration settings.

#### Query Builder

- Completely rebuilt query builder to have specialized editors for Table, Logs, Time Series, and Traces.
- Completely rebuilt SQL generator to support more complicated and dynamic queries.
- Updated query builder options structure to be clearer and support more complex queries.
- Updated database/table selector to be in a more convenient location. Database and table options are automatically selected on initial load.
- Upgraded query builder state management so queries stay consistent when saving/editing/sharing queries.
- Separated Table and Time Series query builders. Table view operates as a catch-all for queries that don't fit the other query types.
- Combined "format" into the query type switcher for simplicity. The query tab now changes the builder view and the display format when on the Explore page. This includes the raw SQL editor.
- Added an OTEL switch for logs and trace views. This will allow for quicker query building for those using the OTEL exporter for ClickHouse.
- Updated Time Series query builder with dedicated Time column. Default filters are added on-load.
- Added an `IS ANYTHING` filter that acts as a placeholder for easily editing later (useful for query templates/bookmarks on the Explore page.)
- Added better support for Map types on the Filter editor.
- LIMIT editor can now be set to 0 to be excluded from the query.
- Table and Time Series views now have a simple / aggregate mode, depending on the query complexity.
- Updated the logs histogram query to use the new query builder options and column hints.
- Added Logs query builder with dedicated Time, Level, and Message columns. Includes OTEL switch for automatically loading OTEL schema columns. Default filters are added on-load.
- Added Trace query builder with dedicated trace columns. Includes OTEL switch for automatically loading OTEL schema columns. Default filters are added on-load.
- Updated data panel filtering to append filters with column hints. Visible in logs view when filtering by a specific level. Instead of referencing a column by name, it will use its hint.
- Order By now lists aggregates by their full name + alias.
- Order By column allows for custom value to be typed in.
- Aggregate column name allows for custom value to be typed in.
- Filter editor allows for custom column names to be typed in.
- Increased width of filter value text input.
- Columns with the `Map*` type now show a `[]` at the end to indicate they are complex types. For example, `SpanAttributes[]`.
- Filter editor now has a dedicated field for map key. You can now select a map column and its key separately. For example, `SpanAttributes['key']`.
- Map types now load a sample of options when editing the `key` for the map. This doesn't include all unique values, but for most datasets it should be a convenience.
- Added column hints, which offers better linking across query components when working with columns and filters. For example, a filter can be added for the `Time` column, even without knowing what the time column name is yet. This enables better SQL generation that is "aware" of a column's intended use.

### Plugin Backend
- Added migration logic for `v3` configs going to `v4+`. This is applied when the config is loaded when building a database connection.
- `$__timeFilter`, `$__fromTime`, and `$__toTime` macros now convert to `DateTime64(3)` for better server-side type conversion. Also enables millisecond precision time range filtering.

#### Datasource Configuration
- Added migration script for `v3.x` configurations to `v4+`. This runs automatically when opening/saving the datasource configuration.
- Renamed config value `server` to `host`.
- Renamed config value `timeout` to the more specific `dial_timeout`.
- Updated labeling for port selection. The default port will now change depending on native/http and secure/unsecure setting.
- Rearranged fields and sections to flow better for initial setup of a new datasource.
- Added plugin version to config data for easier config version migrations in the future.
- Added fields for setting default values for database/table.
- Added section for setting default log database/table/columns. Includes OTEL. These are used when using the log query builder.
- Added section for setting default trace database/table/columns. Includes OTEL. These are used when using the trace query builder.
- Added OTEL switches for logs/traces for quicker query building. OTEL defaults to the latest version, and will auto update if kept on this setting.
- Increased width of inputs for typically long values (server URL, path, etc.)
- Allow adding custom HTTP headers with either plain text or secure credentials. [#633](https://github.com/grafana/clickhouse-datasource/pull/633)
- Add `path` setting to specify an additional URL path when using the HTTP protocol. [#512](https://github.com/grafana/clickhouse-datasource/pull/512)

### Fixes

- Queries will now remain consistent when reloading/editing a previously saved query.
- Fixed default Ad-Hoc filters. [#650](https://github.com/grafana/clickhouse-datasource/pull/650)
- Fixed Ad-Hoc filters parsing numeric fields. [#629](https://github.com/grafana/clickhouse-datasource/pull/629)
- Fixed majority of usability quirks with redesigned query builder.

### Upgrades

- Updated all dependencies to latest compatible versions (Includes Dependabot PRs)

## 3.3.0

### Features

- Support Point geo data type.

### Fixes

- Fix timeInterval_ms macro.
- Fix Table summary and Parts over time panels in Data Analysis dashboard.

### Upgrades

- Upgrade [grafana-plugin-sdk-go](https://github.com/grafana/grafana-plugin-sdk-go).

## 3.2.0

### Features

- Add `timeInterval_ms` macro to allow higher precision queries on DateTime64 columns. [#462](https://github.com/grafana/clickhouse-datasource/pull/462).

### Fixes

- Ensure databases, tables, and columns are escaped correctly. [#460](https://github.com/grafana/clickhouse-datasource/pull/460).
- Fix conditionAll handling. [#459](https://github.com/grafana/clickhouse-datasource/pull/459).
- Fix support for ad-hoc regexp filters: `=~`, `!~` [#414](https://github.com/grafana/clickhouse-datasource/pull/414).
- Do not create malformed adhoc filters [#451](https://github.com/grafana/clickhouse-datasource/pull/451). invalid values will be ignored.
- Fix auto formatting by reverting to table correctly. [#469](https://github.com/grafana/clickhouse-datasource/pull/469).
- Fix parsing of numeric configuration values in `yaml` file. [#456](https://github.com/grafana/clickhouse-datasource/pull/456).

## 3.1.0

- Stable release of v3.0.4-beta

## 3.0.4-beta

- Update Grafana dependencies to >=v9.0.0
- **Feature** - [Add support for the secure socks proxy](https://github.com/grafana/clickhouse-datasource/pull/389)

## 3.0.3-beta

- Update ClickHouse driver to v2.9.2

## 3.0.2-beta

- Custom ClickHouse settings can be set in data source settings. [Allow passing custom ClickHouse settings in datasource](https://github.com/grafana/clickhouse-datasource/pull/366)
- Histogram UI fixes [Histogram UI fixes](https://github.com/grafana/clickhouse-datasource/pull/363)
- Support filter/filter out logs view actions
- Fix undefined database name by default
- Reset level and time field properly on table/database change
- Make it possible to clear the level field (so the histogram will render without grouping by level)
- Fix filter value that gets stuck in the UI
- Tracing dashboard added to default dashboards. [Tracing dashboard ](https://github.com/grafana/clickhouse-datasource/pull/336)

## 3.0.1-beta

- Users on v8.x of Grafana are encouraged to continue to use v2.2.0 of the plugin.
- Users of Grafana v9.x can use v3 however it is beta and may contain bugs.

## 3.0.0

- **Feature** - [Logs volume histogram support](https://github.com/grafana/clickhouse-datasource/pull/352)
- **Chore** - Update clickhouse-go to v2.8.1

## 2.2.1

- **Chore** - Backend binaries compiled with latest go version 1.20.4
- Custom ClickHouse settings can be set in data source settings. Allow passing custom [ClickHouse settings in datasource](https://github.com/grafana/clickhouse-datasource/pull/371)
- Standard Golang HTTP proxy environment variables support (`HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY`). See [FromEnvironment](https://pkg.go.dev/golang.org/x/net/http/httpproxy#FromEnvironment) for more information. If the Grafana instance is started with one of these env variables, the driver will automatically load them now.

## 2.2.0

- **Feature** - [Support format dropdown and support for rendering traces](https://github.com/grafana/clickhouse-datasource/pull/329)
Expand All @@ -15,12 +158,12 @@
## 2.1.0

- **Fix** - Quote table names with dots by @slvrtrn in https://github.com/grafana/clickhouse-datasource/pull/298
- Add a predefined TimeRange filter if there is at least one DateTime* column by @slvrtrn in https://github.com/grafana/clickhouse-datasource/pull/304
- Add a predefined TimeRange filter if there is at least one DateTime\* column by @slvrtrn in https://github.com/grafana/clickhouse-datasource/pull/304

## 2.0.7

- **Fix** - Empty template variables used with the conditionalAll macro work the same as selecting All. [Allow empty Inputs for $__conditionalAll](https://github.com/grafana/clickhouse-datasource/issues/262)
- **Fix** - Intervals are limited to 1 second. [limit $__interval_s to at least 1 second](https://github.com/grafana/clickhouse-datasource/pull/270)
- **Fix** - Empty template variables used with the conditionalAll macro work the same as selecting All. [Allow empty Inputs for $\_\_conditionalAll](https://github.com/grafana/clickhouse-datasource/issues/262)
- **Fix** - Intervals are limited to 1 second. [limit $\_\_interval_s to at least 1 second](https://github.com/grafana/clickhouse-datasource/pull/270)
- **Chore** - Bump ClickHouse go API to v2.5.1 [Bump github.com/ClickHouse/clickhouse-go/v2 from 2.4.3 to 2.5.1](https://github.com/grafana/clickhouse-datasource/pull/283)

## 2.0.6
Expand Down Expand Up @@ -111,7 +254,7 @@

## 0.12.0

- **Feature** - Time series builder: use $__timeInterval macro on time field so buckets can be adjusted from query options.
- **Feature** - Time series builder: use $\_\_timeInterval macro on time field so buckets can be adjusted from query options.

## 0.11.0

Expand All @@ -131,7 +274,7 @@

## 0.9.11

- **Feature** - $__timeInterval(column) and $__interval_s macros
- **Feature** - $**timeInterval(column) and $**interval_s macros

## 0.9.10

Expand Down
39 changes: 19 additions & 20 deletions panels/grafana-clickhouse-datasource/MANIFEST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,32 @@ Hash: SHA512
"signedByOrg": "grafana",
"signedByOrgName": "Grafana Labs",
"plugin": "grafana-clickhouse-datasource",
"version": "3.0.0",
"time": 1681248769311,
"version": "4.0.2",
"time": 1706893008714,
"keyId": "7e4d0c6a708866e7",
"files": {
"CHANGELOG.md": "5a47f65cefd149b93d044db0d8aa20a0d61ed2e1dd15d4e135b031c6611bf32e",
"CHANGELOG.md": "7f1a12e90ac791bd16c252d0c2176c0b363d87fecc1773aee2ec6de729490502",
"LICENSE": "cdd15e614b50e88443fe574ad56bde5ba697d958a45376431638eea816e3bfc3",
"README.md": "da1ece921b4bc2c1de0c0e16f86559f740c53a4310e8c73aceb584f21b0079ba",
"dashboards/cluster-analysis.json": "e5be94806dcef74e8948230234845e1adebce2f69e50abae0cb73550ac07ff3d",
"dashboards/data-analysis.json": "a911f1c6315683112f41277a318a9d4c178f037476a4492aba0dcd3d47e0656f",
"dashboards/query-analysis.json": "47b28a56a00f0b418dbee317eb43748cb4270b0c2f1bfdee5915bfecb2c05a14",
"go_plugin_build_manifest": "bb0047c559ce6b1866a6cc67d736362f29bbcdcb865948aaa031b08cea711463",
"gpx_clickhouse_linux_amd64": "6506e0437e2b2fe374c1ff8cd3048e731073939ab71133be3a44f9b056d8f61a",
"img/logo.png": "57b548fd842706f2845514f661aed5d4b4aeefeb6b6a891bac7cc0392b3ac060",
"img/logo.svg": "1defc6f7e585c67657bcfd8fddc599ee7dfa82f8674413f49fa274c2cd453ec6",
"module.js": "182ef8027f23a69fcab312776bc4830517d81579e704a4da35e32666b5d86a1b",
"module.js.map": "3698468ae6ad1c4f9fde7a9cb4ba464f4c6b9d201889b8fab628a3220f91181d",
"plugin.json": "77dfbd2e9940124595966322f70c5ac47b1d071274f44e25213cb605264b69b5"
"README.md": "242b7431b473b1a10a0ed58339c41f0824fa5a37e0db56619d3e520115842163",
"dashboards/cluster-analysis.json": "03061d7ee3a2b245e28f9291e5a72147d0c2830301cbb7eec934b0d14170b24e",
"dashboards/data-analysis.json": "8d87d43424b1e6cd34d1b7fd2f894b5bac4c13aa2f531598c060a80b19804829",
"dashboards/query-analysis.json": "1b2006a3f4142e512e50156a7d2fd8cf03a178019aaccc964c0283c8559298b3",
"go_plugin_build_manifest": "7d8b428feb6ede5ccf12b2f569440ab379a8a03fa1468646d0d85935e1cc6310",
"gpx_clickhouse_linux_amd64": "a4ae09c037607bf14ec78178649c575a1effe6daa130e1dae319aaedd7ffe331",
"img/logo.svg": "838199055d86584ff105e5e91013203a6acb7d3f2061ae27678786125ab11f09",
"module.js": "d1f61c74b2bbfdc359a9183c1afb6a8b669b1cafa75a139523b27232190cfaf2",
"module.js.map": "a270713b83e35bdc2fe81d5afe604a5c626930fb1d5b36e658a0e713b3dbdc08",
"plugin.json": "61dcb5cad8937cce0d988c067ab2f7232d84f5e2e51e34a42d5cf078a6cc6530"
}
}
-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v4.10.10
Comment: https://openpgpjs.org

wrkEARMKAAYFAmQ10gEAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
cIhm5w73AgkBsO+bQDRRcZUJURFibQwpOQhCu1fDPprYqwR585Z9wt/yxzZB
JoL8zVP0rclqRXLvnqBbs1/7xmqwsSC3Qc0N4HECCQGue9LTfNgk2PJvpiSZ
qVaeYHJZjlCnDe4s5SncpSGn2bBjwngpPxGRq7BFRR/eGW1ViA+ggOI0Avvz
3DZz/i1a6g==
=tWsh
wrgEARMKAAYFAmW9HtAAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
cIhm53dVAgkBjRvAp83TqiWhhDbHjB/EWJogo9/pqPvoDsyc7aLb3+zm+geI
ICRlkIPUGcvLXmaWYjiIgZtnpmSJpz6cpWNUMIgCCJqKnaNLjQwhOd0T6o3H
lDnbWqbnaphxKAYx2ELP1OhyVpZDDKpCuIlPEWJtTjVXxXhsIiO418AYaYxt
zh/UOtXE
=39z5
-----END PGP SIGNATURE-----
Loading

0 comments on commit 701ac1a

Please sign in to comment.