xinxinh2020 commented on PR #8159:
URL: https://github.com/apache/apisix/pull/8159#issuecomment-1290071166

   > I don't think it's a good idea to support constants on `extra_labels`, we 
have metrics like `apisix_node_info`, maybe we should extend it to support more 
constants.
   
   As far as i am concerned, `apisix_node_info` is used to show all of the 
apisix info,  and the `apisix_node_info` is not associated with other metrics 
like `http_status`. 
   Maybe we can add a variable like $node_info_id, so we can refer the 
`apisix_node_info` in other metrics. 
   But i still argue that adding apisix-cluster-level const in some metrics is 
useful. For example, we have four apisix clusters with lables:
   - cluster1: deploy=vm,  provider=aws, type=public
   - cluster2: deploy=k8s, provider=aws, type=private
   - cluster3: deploy=k8s, provider=azure, type=private
   - cluster4: deploy=vm, provider=azure, type=public
   
   Even with extended `apisix_node_info`, how can i query metrics group by  any 
combination of these labels, such as provider=aws, or deploy=vm&type=public ?
   
   If we tag these labels in metrics, it would be quite convenient and a promql 
like `apisix_http_status{provider="aws"}` would be enough.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to