Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,11 @@ GO_TEST_FLAGS ?= -coverprofile=.coverprofile
.PHONY: test
test: check-license-headers check-codegen gotest check-fmtprints check-todos

GO_TEST_PATH ?= $(shell $(GO) list ./... | grep -v v2/integration)
GO_TEST_PATH ?= $(shell $(GO) list ./... | grep -v v2/integration | tr '\n' ' ')
.PHONY: gotest
gotest:
$(GO) test -timeout=5m -v ${GO_TEST_FLAGS} $(GO_TEST_PATH)
@echo "All tests passed successfully."

.PHONY: data-race-test
data-race-test:
Expand Down
16 changes: 16 additions & 0 deletions docs/developer/environment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ for verification purposes.
You can stop the developer environment by running `make developer-stop`. To
delete the developer environment, run `make developer-delete` which will destroy
all data.

## Included backends

The Compose file brings up Prometheus, InfluxDB 2.x, InfluxDB 3.x Core (on
`:8181`, seeded by the telegraf container) and ClickHouse alongside Grafana.
Trickster's dev config registers a matching backend for each, so Grafana can
query the upstream directly or via Trickster for a side-by-side comparison.

For InfluxDB 3.x, Trickster also exposes an Apache Arrow Flight SQL (gRPC)
proxy on `:8485` (`flight_port` in the backend config). The
`Trickster InfluxDB 3` Grafana dashboard exercises both the HTTP InfluxQL
endpoint and Flight SQL via the InfluxDB datasource in SQL mode, with direct
and Trickster-cached targets on the same panel. An equivalent
`ClickHouse (Grafana Plugin)` dashboard is included for ClickHouse. The
`verify-influxdb3.sh` script runs a quick end-to-end check of the v3 HTTP
and Flight SQL paths through Trickster.
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": { "type": "linear" },
"showPoints": "auto",
"spanNulls": false,
"stacking": { "group": "A", "mode": "none" },
"thresholdsStyle": { "mode": "off" }
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green" },
{ "color": "red", "value": 80 }
]
}
},
"overrides": []
},
"gridPos": { "h": 22, "w": 12, "x": 0, "y": 0 },
"id": 1,
"options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true },
"tooltip": { "hideZeros": false, "mode": "single", "sort": "none" }
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "${datasource}"
},
"editorType": "sql",
"format": 1,
"meta": { "builderOptions": { "database": "default", "table": "trips" } },
"queryType": "sql",
"rawSql": "SELECT toStartOfFiveMinute(pickup_datetime) AS t, count() AS Count FROM default.trips WHERE $__timeFilter(pickup_datetime) GROUP BY t ORDER BY t",
"refId": "A"
}
],
"title": "# Trips Over Time",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": { "type": "linear" },
"showPoints": "auto",
"spanNulls": false,
"stacking": { "group": "A", "mode": "none" },
"thresholdsStyle": { "mode": "off" }
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green" },
{ "color": "red", "value": 80 }
]
}
},
"overrides": []
},
"gridPos": { "h": 22, "w": 12, "x": 12, "y": 0 },
"id": 2,
"options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true },
"tooltip": { "hideZeros": false, "mode": "single", "sort": "none" }
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "${datasource}"
},
"editorType": "sql",
"format": 1,
"meta": { "builderOptions": { "database": "default", "table": "trips" } },
"queryType": "sql",
"rawSql": "WITH sumIf(trip_id, payment_type = 'CSH') AS cash_trips, sumIf(trip_id, payment_type != 'CSH') AS non_cash_trips SELECT toStartOfFiveMinute(pickup_datetime) AS t, non_cash_trips / (cash_trips + non_cash_trips) * 100 AS \"Card Use Rate\" FROM default.trips WHERE $__timeFilter(pickup_datetime) GROUP BY t ORDER BY t",
"refId": "A"
}
],
"title": "% Trips Paid w/ Credit Card",
"type": "timeseries"
}
],
"preload": false,
"refresh": "5s",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"allowCustomValue": false,
"current": {
"text": "clickhouse-grafana-direct",
"value": "clickhouse-grafana-direct"
},
"description": "",
"name": "datasource",
"options": [],
"query": "grafana-clickhouse-datasource",
"refresh": 1,
"regex": "",
"type": "datasource"
}
]
},
"time": {
"from": "now-15m",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "ClickHouse (Grafana Plugin)",
"uid": "clickhouse-grafana-plugin",
"version": 1
}
Loading
Loading