Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-17804

Prometheus metrics only include the last set of labels

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      A prometheus endpoint was added in https://issues.apache.org/jira/browse/HADOOP-16398, but the logic that puts them into a map based on the "key" incorrectly hides any metrics with the same key but different labels. The relevant code is here: https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/sink/PrometheusMetricsSink.java#L55

      The labels/tags need to be taken into account, as different tags mean different metrics. For example, I came across this while trying to scrape metrics for all the queues in our scheduler. Only the last queue is included because all the metrics have the same "key" but a different "queue" label/tag.

      Attachments

        Issue Links

          Activity

            People

              kimahriman Adam Binford
              kimahriman Adam Binford
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m