Is there a way to make variables in dashboard opti...
# support
s
Is there a way to make variables in dashboard optional? I'd like to build something similar to filters in log explorer (https://signoz-community.slack.com/archives/C01HWQ1R0BC/p1737709052802529). if I add a variable for something and not select anything my log query obviously won't find any matches.
n
Interesting, cc @Srikanth Chekuri ^
s
if I add a variable for something and not select anything my log query obviously won't find any matches.
That's what the variable in the dashboard does as well. Your point is not clear to me. Please help me understand.
s
I aggregate logs from multiple services. I have a variable for the service name. I'd like to have a panel that by default lists all logs. if the variable is not empty, it should filter the service name to that. if I ad
service.name = $service
as a Logs filter, then no logs show if $service is empty. i'd some sort of conditional check. OR $service is empty, or conditional panel visibility maybe (although that gets awkward when you have 3-4 variables and need a separate conditional panel for each combination)
s
Why is $service empty?
s
because nothing has been selected in the dashboard for it. that's the point, I want a way for a variable to say "all"
s
You can configure the variable to include "ALL" that includes all values.
s
I see, that's hidden behind the allow multiple option. that seems to work when I do an IN $service condition then. If that's the recommended approach for optional variables like this then that seems to work, thanks