apisix icon indicating copy to clipboard operation
apisix copied to clipboard

feat: Apisix Prometheus metrics - Disable unneeded labels/metrics

Open luarx opened this issue 4 months ago • 2 comments

Description

  1. I’d like the option to disable unused metric labels in order to reduce APISIX Prometheus metrics cardinality and prevent overflow errors, such as those mentioned in this issue
prometheus:
  metrics:
    http_status:                         
      disable_labels:                  
        - http_status
        - node

Another solution is about configure the specific metric labels to use, example:

prometheus:
  metrics:
    http_status:                         
      labels:                  
        - http_status
        - node
  1. I’d like the option to disable unused metrics to reduce the amount of memory of the plugin when creating metrics that are not needed in my case
prometheus:
  metrics:
    http_status:                         
      disable: true

Thanks in advance!

luarx avatar Oct 16 '25 08:10 luarx

Hi @luarx, I saw a similar one https://github.com/apache/apisix/issues/12680. Can we discuss this in one issue? I'll close it. Let's discuss it here.

Baoyuantop avatar Oct 24 '25 02:10 Baoyuantop

Sure, I have updated this task with the info of the other one 👍

luarx avatar Nov 24 '25 12:11 luarx

Hello, I'm also interested in this. As an initial POC would it be okay to disable certain labels globally? Or would we need to configure labels for each individual metric?

manueljishi avatar Dec 12 '25 15:12 manueljishi