So I have 2 metrics, I need to get label values from first metric and then query over 2nd metric, where {param="label_values_from_1st_metric"}. For ex:
metric_1{instance="abc"} - returns 3 timeseries:
metric_1{name="my-service", env="production", host="example-0.org"}
metric_1{name="my-service", env="production", host="example-1.org"}
metric_1{name="my-service", env="production", host="example-2.org"}
Next I need to make query over 2nd metric using host values from 1st query.
metric_2{domain="exmple-0,1,2.org"}
So the question is, how I can pass label_values to 2nd query? As far as I understand, I can use label_values() only for variables in grafana panel, so I can't write one query that will do that for me.