Class NodeValueFetcher

java.lang.Object
org.apache.solr.client.solrj.impl.NodeValueFetcher

public class NodeValueFetcher extends Object
This class is responsible for fetching metrics and other attributes from a given node in Solr cluster. This is a helper class that is used by SolrClientNodeStateProvider
  • Field Details

  • Constructor Details

    • NodeValueFetcher

      public NodeValueFetcher()
  • Method Details

    • getTags

      public void getTags(Set<String> requestedTags, org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.RemoteCallCtx ctx)
    • extractMetricNameFromLine

      public static String extractMetricNameFromLine(String line)
      Extracts the metric name from a prometheus formatted metric:

      - With labels: solr_metrics_core_requests_total{core="demo",...} 123.0 - Without labels: solr_metrics_core_requests_total 123.0 - With exemplars: solr_metrics_core_requests_total{core="demo"} 123.0 # {trace_id="abc123"} 2.0 1234567890 The sample inputs would return solr_metrics_core_requests_total

    • extractLabelValueFromLine

      public static String extractLabelValueFromLine(String line, String labelKey)