Last updated: April 18, 2026
Add Variables
Variables are an advanced feature that enables dynamic filtering across dashboard panels.
A variable defines a selectable parameter—such as a service name attribute—that is substituted into PromQL queries at runtime.
Create a Variable
-
Click Add variable in the dashboard toolbar.
The Add new variable dialog opens.
-
Select the attribute to use as the variable source (e.g.,
service.name). -
Configure the variable's display name and default value.
Use Variables in Queries
Once defined, reference the variable in any panel's PromQL query using the standard variable substitution syntax. When a user changes the variable's selection, all panels referencing that variable update automatically.
Understand Variable Types
Dash0 has three different ways of using dashboard variables:
Text Variables
In Dash0, dashboarding variables can represent variables containing text that is defined once and can be reused in every panel.
That text can be used as a simple replacement in queries, for example:
1spans_total{my_label=~"$variable_name"}
List Variables
Variables can also be lists of values. These lists can be a static source, a list based on time-series label values, a list of time-series label names, or a result of a PromQL query.
In this case, a filter will be specified by a list instead of a single value:
1spans_total{my_label=~"$variable_name"}
Filter Variables
Variables in Dash0 can act as filters. Specify a filter variable name with an attribute key. The attribute key is fixed, but the operator and matching values are up to you:
1spans_total{$variable_name}
Filter variables support hierarchical dependencies, letting you chain filters together. Dependent variables populate their options based on your parent selections and adapt operators accordingly. When constraints result in no available values, Dash0 lets you know. Configure dependencies via the "Depends on filter variables" setting to set up parent-child relationships for drill-down exploration.


