Are variables working? we have a service name e.g....
# general
n
Are variables working? we have a service name e.g. myservice_dev if we run a query on trace for the following it works: serviceName = myservice_dev Then we create a variable called environment custom type and set values e.g. dev,qa We then try to use in a dashboard pannel e.g. serviceName = myservice_{{.environment}} as outlined in https://signoz.io/docs/userguide/manage-variables/ It does not work. Chrome network for query_range shows its not populating correctly
key
:
{key: "serviceName", dataType: "string", type: "tag", isColumn: true, isJSON: false,…}
dataType
:
"string"
id
:
"serviceName--string--tag--true"
isColumn
:
true
isJSON
:
false
key
:
"serviceName"
type
:
"tag"
op
:
"="
value
:
"myservice_{{.environment}}"
s
They are not populated on client side. The variables get substituted in query-service.
n
Attached is query where environment set to dev and the payload showing this. The result is 0. if we dont use a variable the result is good (see attached)
@Srikanth Chekuri any update on this?
s
This kind of variable substitution doesn't work. Please add
deployment.environment
(https://opentelemetry.io/docs/specs/semconv/resource/deployment-environment/) to your resource attributes and use it as full variable filter instead.
n
ok thanks, did that and working now