Hello everyone! I have a small question. I have a ...
# support
d
Hello everyone! I have a small question. I have a dashboard, and i'm trying to sort all graphs by env. I have a variable for the deployment_environment, but when i filter in the dashboard it doesn't update. Anybody see anything wrong in my variable that could be causing this?
v
@Sagar Rajput Please take a look
s
@Daniel - your variable looks good to me, can you share a bit more about your, dashboard setup. also do see if you can share the network tab while switching between env variable values, would like to see more info about it the API calls are made here. Thanks!
d
Sure thing! So context its just a dotnet 9 web api, with all those goody built in metrics. Standard stuff like this
Here is what a standard query looks like. Disabled metrics for a lot of these built in endpoints so a lot of those != aren't relevant
but just took a screenshot to show you that I do get values for deployment_enviornment
and here is a standard network call calling the change variable
image.png
network calls for that start at query_range
payload is
Copy code
variables
: 
{SIGNOZ_START_TIME: 1741405274000, SIGNOZ_END_TIME: 1742269274000, Service: "stg-xxxxx",…}
SIGNOZ_END_TIME
: 
1742269274000
SIGNOZ_START_TIME
: 
1741405274000
Service
: 
"stg-xxxxx"
deployment_environment
: 
"stg"
payload is { "status": "success", "data": { "resultType": "", "result": [ { "table": { "columns": [ { "name": "http_response_status_code", "queryName": "", "isValueColumn": false }, { "name": "http_route", "queryName": "", "isValueColumn": false }, { "name": "http_request_method", "queryName": "", "isValueColumn": false }, { "name": "B", "queryName": "B", "isValueColumn": true } ], "rows": [ { "data": { "B": 3, "http_request_method": "GET", "http_response_status_code": "401", "http_route": "api/docs/{documentName?}" } }, { "data": { "B": 2, "http_request_method": "POST", "http_response_status_code": "400", "http_route": "api/v{version:apiVersion}/xxxx } }, { "data": { "B": 1, "http_request_method": "POST", "http_response_status_code": "400", "http_route": "admin/register" } }, { "data": { "B": 1, "http_request_method": "POST", "http_response_status_code": "401", "http_route": "admin/login" } }, { "data": { "B": 1, "http_request_method": "POST", "http_response_status_code": "401", "http_route": "api/v{version:apiVersion}/xxxx" } } ] } } ] } }
these are of course numerous but just giving you an idea. Let me know how that looks @Sagar Rajput
s
these look fine, what version of the sign of u are you using - (you can find that here - image below)
Also, can you show me something like this, to see the actual behaviour and flow happening for you. @Daniel
d
We are using signoz cloud, so don't know if thats applicable to me?
with qa selected
stg
prd
payloads are all identical to the ones above
request/payloads
s
@Daniel - quick huddle? I can quickly see and suggest if I find anything here, as so far, things look good
d
Yup give me one sec!
s
@Daniel - I checked and the solution we discussed on call is the way to go about this. - i.e. -
Copy code
Add the dependent variable that you want your dashboards to filter on as a where clause. The convention for that would be, let's say we need a dependency (to filter upon) on variable name - deployment_environment. then should be added in the where clause as - 

deployment_environment = $deployment_environment

this should enable your respective dashboard panel to filter upon the variable change.
Thanks!
d
Great thank you! Is that in the docs or am I missing it? https://signoz.io/docs/userguide/manage-variables/
c
Hey, Daniel! We currently don't have an exhaustive section to explain how to add variables in a panel. We will be working on adding this section to the doc and add an example for the same. Issue for this - here cc: @Sagar Rajput