Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15564

Improve filtering expressions in /admin/metrics



    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 8.10
    • metrics
    • None


      There are currently several ways to filter what metrics should be returned by /admin/metrics but they have one important limitation: all types of filtering criteria (group, type, prefix, regex, key) use implicit OR, so it's only ever possible to broaden the filters but not to narrow them down.

      This issue came up while I was reviewing the default Prometheus exporter config and I noticed that it pulls ALL metrics. This is extremely wasteful and puts unnecessary load on the nodes, especially since only some of the metrics are then used, either by the exporter itself or by the default dashboard. In addition to that, the exporter needs to build an object tree from all these metrics in order to apply the export rules, which leads to excessive memory / cpu consumption in the reporter process.

      We should come up with a way to make these filters more expressive so that it's possible e.g. to select only some metrics from a particular registry.

      The simplest way to implement this would be to extend the syntax of the key parameter to support regex expressions in the parts of the key that specify the metric name and the property name.


        1. SOLR-15564.patch
          14 kB
          Andrzej Bialecki



            ab Andrzej Bialecki
            ab Andrzej Bialecki
            0 Vote for this issue
            3 Start watching this issue