Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bb94ed5
feat: add data source and connection variable types to dashboards
pulpdrew Nov 16, 2026
078c4be
fix: check only the variable references a dashboard update adds, and …
pulpdrew Nov 16, 2026
d638aa1
test: add isBroadcastEnabled to ad hoc filter fixtures
pulpdrew Nov 17, 2026
d569edc
feat: support data source and connection variables in the external AP…
pulpdrew Nov 16, 2026
6d96f92
fix: check only the variable references an external API or MCP dashbo…
pulpdrew Nov 16, 2026
e0ba99b
fix: Check source var kinds against tile
pulpdrew Nov 17, 2026
d1bfdde
review: Address review findings
pulpdrew Nov 17, 2026
ef79c91
fix: show data source variables that offer promql sources while PromQ…
pulpdrew Nov 17, 2026
f408b82
feat: add data source variables to dashboard filters and tiles
pulpdrew Nov 16, 2026
8f615c8
feat: show a filter error when a data source variable selects a sourc…
pulpdrew Nov 16, 2026
335259d
review: Address review feedback
pulpdrew Nov 17, 2026
1017e51
review: Offer data source variable sources with isSourceOfferedByVari…
pulpdrew Nov 18, 2026
05260bf
feat: let tiles and filters use a data source variable as their source
pulpdrew Nov 16, 2026
e5613ee
feat: offer data source variables with some usable kinds in pickers, …
pulpdrew Nov 16, 2026
64ab3f3
review: Address review feedback
pulpdrew Nov 17, 2026
a808f3c
fix: Improve alert removal and import validation
pulpdrew Nov 18, 2026
f240490
feat: add connection variables for raw SQL tiles and connection-scope…
pulpdrew Nov 13, 2026
0a3f111
feat: let SQL query filters run on a connection variable
pulpdrew Nov 17, 2026
825d764
Merge remote-tracking branch 'origin/main' into drew/source-vars-1
pulpdrew Nov 18, 2026
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
7 changes: 7 additions & 0 deletions .changeset/source-vars-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@hyperdx/common-utils': minor
'@hyperdx/api': minor
'@hyperdx/app': patch
---

feat: add data source and connection variable types to dashboards
5 changes: 5 additions & 0 deletions .changeset/source-vars-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperdx/api': minor
---

feat: support data source and connection variables in the external API and MCP
5 changes: 5 additions & 0 deletions .changeset/source-vars-3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperdx/app': minor
---

feat: add data source variables to dashboard filters and tiles
5 changes: 5 additions & 0 deletions .changeset/source-vars-4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperdx/app': minor
---

feat: let tiles and filters use a data source variable as their source
8 changes: 8 additions & 0 deletions .changeset/source-vars-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@hyperdx/app': minor
'@hyperdx/api': minor
'@hyperdx/common-utils': minor
---

feat: add connection variables for raw SQL tiles, SQL query filters, and
connection-scoped data source variables
214 changes: 196 additions & 18 deletions packages/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -1980,7 +1980,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2057,7 +2057,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2144,7 +2144,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2227,7 +2227,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2288,7 +2288,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2343,7 +2343,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2437,7 +2437,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2495,7 +2495,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2559,7 +2559,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to query.",
"description": "ID of the data source to query, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2599,7 +2599,7 @@
},
"sourceId": {
"type": "string",
"description": "ID of the data source to mine patterns from.",
"description": "ID of the data source to mine patterns from, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard.",
"example": "65f5e4a3b9e77c001a111111"
},
"select": {
Expand Down Expand Up @@ -2664,7 +2664,7 @@
},
"connectionId": {
"type": "string",
"description": "ID of the ClickHouse connection to execute the query against.",
"description": "ID of the ClickHouse connection to execute the query against, or\n`$connectionVariable` of a CONNECTION filter on the dashboard.\n",
"example": "65f5e4a3b9e77c001a567890"
},
"sqlTemplate": {
Expand All @@ -2675,7 +2675,7 @@
},
"sourceId": {
"type": "string",
"description": "Optional ID of the data source associated with this Raw SQL chart. Used for applying dashboard filters.",
"description": "Optional ID of the data source associated with this Raw SQL chart, or `$sourceVariable` of a DATA_SOURCE filter on the dashboard. Used for applying dashboard filters.",
"example": "65f5e4a3b9e77c001a567890"
},
"numberFormat": {
Expand Down Expand Up @@ -4031,6 +4031,12 @@
},
{
"$ref": "#/components/schemas/AdhocFilterInput"
},
{
"$ref": "#/components/schemas/DataSourceFilterInput"
},
{
"$ref": "#/components/schemas/ConnectionFilterInput"
}
],
"discriminator": {
Expand All @@ -4040,7 +4046,179 @@
"STATIC_LIST": "#/components/schemas/StaticListFilterInput",
"PROMETHEUS_LABEL": "#/components/schemas/PrometheusLabelFilterInput",
"SQL_QUERY": "#/components/schemas/SqlQueryFilterInput",
"ADHOC": "#/components/schemas/AdhocFilterInput"
"ADHOC": "#/components/schemas/AdhocFilterInput",
"DATA_SOURCE": "#/components/schemas/DataSourceFilterInput",
"CONNECTION": "#/components/schemas/ConnectionFilterInput"
}
}
},
"DataSourceFilterInput": {
"type": "object",
"description": "A variable whose single, required value is a source. Tiles reference it\nas `$variableName` in their sourceId, and other filters in sourceId or\nappliesToSourceIds, so viewers can switch the source those read. Tiles\nthat use it do not load until a source is selected, and cannot have\nalerts.\n",
"required": [
"type",
"name",
"allowedSourceKinds"
],
"properties": {
"type": {
"type": "string",
"enum": [
"DATA_SOURCE"
],
"description": "Filter type discriminator. Must be \"DATA_SOURCE\".",
"example": "DATA_SOURCE"
},
"name": {
"type": "string",
"minLength": 1,
"description": "Display name of the variable's dropdown",
"example": "Logs source"
},
"variableName": {
"type": "string",
"maxLength": 64,
"pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
"description": "Token tiles and filters reference the selected source by, as `$variableName`.",
"example": "logs"
},
"isGlobalRequirement": {
"type": "boolean",
"default": false,
"description": "Blocks every tile on the dashboard until a value is selected. False\n(the default) blocks only the tiles that reference the variable.\n",
"example": true
},
"minSelections": {
"type": "integer",
"enum": [
1
],
"default": 1,
"description": "Must be 1 if provided. The variable always requires a selection.",
"example": 1
},
"maxSelections": {
"type": "integer",
"enum": [
1
],
"default": 1,
"description": "Must be 1 if provided. The variable is always single-select.",
"example": 1
},
"isBroadcastEnabled": {
"type": "boolean",
"enum": [
false
],
"default": false,
"description": "Must be false or omitted.",
"example": false
},
"isVariableEnabled": {
"type": "boolean",
"enum": [
true
],
"default": true,
"description": "Must be true if provided, and is true when omitted.",
"example": true
},
"allowedSourceKinds": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"enum": [
"log",
"trace",
"session",
"metric",
"promql"
]
},
"description": "Kinds of sources offered. A field can reference the variable if it\naccepts at least one listed kind. A tile whose selected source is a\nkind it cannot use shows an error instead of running.\n",
"example": [
"log"
]
},
"connectionId": {
"type": "string",
"description": "Optional connection the offered sources are limited to: a\nconnection ID, or `$name` of a CONNECTION filter on the dashboard.\n",
"example": "$conn"
}
}
},
"ConnectionFilterInput": {
"type": "object",
"description": "A variable whose single, required value is a connection. Raw SQL tiles\nreference it as `$variableName` in their connectionId, and data source\nvariables and SQL query filters in theirs. Tiles that use it do not load\nuntil a connection is selected, and cannot have alerts.\n",
"required": [
"type",
"name"
],
"properties": {
"type": {
"type": "string",
"enum": [
"CONNECTION"
],
"description": "Filter type discriminator. Must be \"CONNECTION\".",
"example": "CONNECTION"
},
"name": {
"type": "string",
"minLength": 1,
"description": "Display name of the variable's dropdown",
"example": "Connection"
},
"variableName": {
"type": "string",
"maxLength": 64,
"pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
"description": "Token raw SQL tiles reference the selected connection by, as `$variableName`.",
"example": "conn"
},
"isGlobalRequirement": {
"type": "boolean",
"default": false,
"description": "Blocks every tile on the dashboard until a value is selected. False\n(the default) blocks only the tiles that reference the variable.\n",
"example": true
},
"minSelections": {
"type": "integer",
"enum": [
1
],
"default": 1,
"description": "Must be 1 if provided. The variable always requires a selection.",
"example": 1
},
"maxSelections": {
"type": "integer",
"enum": [
1
],
"default": 1,
"description": "Must be 1 if provided. The variable is always single-select.",
"example": 1
},
"isBroadcastEnabled": {
"type": "boolean",
"enum": [
false
],
"default": false,
"description": "Must be false or omitted.",
"example": false
},
"isVariableEnabled": {
"type": "boolean",
"enum": [
true
],
"default": true,
"description": "Must be true if provided, and is true when omitted.",
"example": true
}
}
},
Expand Down Expand Up @@ -4076,7 +4254,7 @@
},
"sourceId": {
"type": "string",
"description": "Source ID this dashboard filter key applies to",
"description": "Source ID this dashboard filter key applies to, or `$name` of a DATA_SOURCE filter on the dashboard",
"example": "65f5e4a3b9e77c001a111111"
},
"sourceMetricType": {
Expand Down Expand Up @@ -4370,7 +4548,7 @@
},
"connectionId": {
"type": "string",
"description": "ID of the ClickHouse connection the query runs on.",
"description": "ClickHouse connection the query runs on: a connection ID, or\n`$name` of a CONNECTION filter on the dashboard.\n",
"example": "65f5e4a3b9e77c001a567890"
},
"sqlTemplate": {
Expand Down Expand Up @@ -4469,7 +4647,7 @@
"items": {
"type": "string"
},
"description": "IDs of the sources whose keys and values the filter suggests, all of sourceType.",
"description": "IDs of the sources whose keys and values the filter suggests, all of sourceType, or `$name` of data source variables.",
"example": [
"65f5e4a3b9e77c001a111111"
]
Expand All @@ -4493,7 +4671,7 @@
"items": {
"type": "string"
},
"description": "IDs of the sources whose tiles the conditions apply to, all of\nsourceType. Omit or send an empty array to apply to the tiles of\nthe filter's sources.\n",
"description": "IDs of the sources whose tiles the conditions apply to, all of\nsourceType, or `$name` of data source variables. Omit or send an\nempty array to apply to the tiles of the filter's sources.\n",
"example": [
"65f5e4a3b9e77c001a111111"
]
Expand Down
Loading
Loading